mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-14 19:59:14 +02:00
IDE: fixed parsing of todo items without semicolon, support was removed in r13010 #42edb792e6 (issue #13684)
git-svn-id: trunk@19939 -
This commit is contained in:
parent
3005b7d87f
commit
1994036cf2
@ -39,6 +39,14 @@
|
|||||||
{#done -oOwnerName -cCategoryName: Todo_text}
|
{#done -oOwnerName -cCategoryName: Todo_text}
|
||||||
|
|
||||||
the -o and -c tags are optional.
|
the -o and -c tags are optional.
|
||||||
|
|
||||||
|
If the -o and -c tags are not used, then the variant without semicolon is
|
||||||
|
allowed too:
|
||||||
|
{TODO Todo_text}
|
||||||
|
{DONE Todo_text}
|
||||||
|
{#todo Todo_text}
|
||||||
|
{#done Todo_text}
|
||||||
|
|
||||||
|
|
||||||
Sub comments in nested comments are ignored.
|
Sub comments in nested comments are ignored.
|
||||||
*)
|
*)
|
||||||
@ -413,35 +421,38 @@ begin
|
|||||||
aTLFile.Add(Result);
|
aTLFile.Add(Result);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
n := 1;
|
if Pos(cSemiColon, ParsingString)>0 then
|
||||||
TempStr := '';
|
|
||||||
Strlen := Length(ParsingString);
|
|
||||||
|
|
||||||
// Parse priority, owner and category
|
|
||||||
while (n <= StrLen) and (ParsingString[n]<>cSemiColon) do
|
|
||||||
begin
|
begin
|
||||||
|
// Parse priority, owner and category
|
||||||
aChar := ParsingString[n];
|
n := 1;
|
||||||
|
TempStr := '';
|
||||||
|
Strlen := Length(ParsingString);
|
||||||
|
|
||||||
// Add char to temporary string
|
while (n <= StrLen) and (ParsingString[n]<>cSemiColon) do
|
||||||
if (aChar<>cSemiColon) and (aChar<>cWhiteSpace) then
|
|
||||||
TempStr := TempStr + aChar
|
|
||||||
|
|
||||||
// Process temporary string
|
|
||||||
else
|
|
||||||
begin
|
begin
|
||||||
SetItemFields(Result, TempStr);
|
|
||||||
TempStr := '';;
|
|
||||||
end;
|
|
||||||
|
|
||||||
inc(N);
|
|
||||||
|
|
||||||
end;//while
|
aChar := ParsingString[n];
|
||||||
|
|
||||||
SetItemFields(Result, TempStr);
|
// Add char to temporary string
|
||||||
|
if (aChar<>cSemiColon) and (aChar<>cWhiteSpace) then
|
||||||
Delete(ParsingString, 1, n);
|
TempStr := TempStr + aChar
|
||||||
|
|
||||||
|
// Process temporary string
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
SetItemFields(Result, TempStr);
|
||||||
|
TempStr := '';;
|
||||||
|
end;
|
||||||
|
|
||||||
|
inc(N);
|
||||||
|
|
||||||
|
end;//while
|
||||||
|
|
||||||
|
SetItemFields(Result, TempStr);
|
||||||
|
|
||||||
|
Delete(ParsingString, 1, n);
|
||||||
|
end;
|
||||||
|
|
||||||
// Set item text
|
// Set item text
|
||||||
Result.Text := ParsingString;
|
Result.Text := ParsingString;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user