|
From: silvioprog <sil...@gm...> - 2016-09-15 04:56:35
|
Hello,
I've declared some codes using the @longCode tag, however I've noticed it
add extra first unnecessary white-spaces.
See the indented code below:
TObjectHelper = class helper for TObject
public
{ Returns the qualified name of the class.
Example:
@longCode(
program Test;
begin
Writeln(TObject.QualifiedClassName); // displays System.TObject
end.
)
@returns(The qualified name of the class)
}
class function QualifiedClassName: string;
end;
it generates the following result:
[image: Inline image 1]
noticed the original indentation was broke, because it declared about 7
extra spaces:
.......program Test;
....... begin
....... Writeln(TObject.QualifiedClassName); // displays System.TObject
....... end.
it should be:
program Test;
begin
..Writeln(TObject.QualifiedClassName); // displays System.TObject
end.
and I found a workaround in the PasDoc's source code to solve it:
https://github.com/michaliskambi/pasdoc/blob/master/source/component/PasDoc_GenHtml.pas#L121
but it sounds a little bit ugly, e.g:
TObjectHelper = class helper for TObject
public
{ Returns the qualified name of the class.
Example:
@longCode(
program Test;
begin
Writeln(TObject.QualifiedClassName); // displays System.TObject
end.
)
@returns(The qualified name of the class)
}
class function QualifiedClassName: string;
end;
because I don't have any declaration starting too left of my source editor
except reserved words like program, unit, implementation and so on. :-)
So, what do you think about removing all first white-spaces? See a preview
showing how it would be:
[image: Inline image 2]
--
Silvio Clécio
|