Commit c8edcf8 1 parent adc87e3 commit c8edcf8 Copy full SHA for c8edcf8
File tree 2 files changed +17
-0
lines changed
2 files changed +17
-0
lines changed Original file line number Diff line number Diff line change 38
38
39
39
20171007 - enabled bullets.
40
40
20171112 - added code to restore < and >
41
+ 2018/01/31 - and &
41
42
}
42
43
43
44
{ $mode objfpc}{ $H+}
@@ -178,6 +179,12 @@ function TBLoadNote.ReplaceAngles(const Str : AnsiString) : AnsiString;
178
179
Start := Index + 3 ;
179
180
Continue;
180
181
end ;
182
+ if ' &' = UTF8Copy(Str, Index, 5 ) then begin
183
+ Result := Result + UTF8Copy(Str, Start, Index - Start) + ' &' ;
184
+ inc(Index);
185
+ Start := Index + 4 ;
186
+ Continue;
187
+ end ;
181
188
inc(Index);
182
189
end ;
183
190
Result := Result + UTF8Copy(Str, Start, Index - Start);
Original file line number Diff line number Diff line change 48
48
previous queued format changes. Possibly. This is not robust code.
49
49
2018/01/01 Yet another bug fix for BulletList(), this time I've got it !
50
50
2018/01/25 Changes to support Notebooks
51
+ 2018/01/31 Added code to reprocess &
51
52
}
52
53
53
54
{ $mode objfpc}{ $H+}
@@ -250,6 +251,7 @@ procedure TBSaveNote.BulletList(var Buff : ANSIString);
250
251
end ;
251
252
252
253
function TBSaveNote.RemoveBadCharacters (const InStr : ANSIString) : ANSIString;
254
+ // It appears that Tomboy only processes <, > and &
253
255
var
254
256
// Res : ANSIString;
255
257
Index : longint = 1 ;
@@ -271,6 +273,14 @@ function TBSaveNote.RemoveBadCharacters(const InStr : ANSIString) : ANSIString;
271
273
Start := Index;
272
274
continue;
273
275
end ;
276
+ if InStr[Index] = ' &' then begin
277
+ Result := Result + UTF8Copy(InStr, Start, Index - Start);
278
+ Result := Result + ' &' ;
279
+ inc(Index);
280
+ Start := Index;
281
+ continue;
282
+ end ;
283
+
274
284
inc(Index);
275
285
end ;
276
286
Result := Result + UTF8Copy(InStr, Start, Index - Start);
You can’t perform that action at this time.
0 commit comments