You are not logged in.
The function HtmlEscapeMarkdown does not generate HTML code compatible with the specification. If one uses the specification on WikiPedia, here the links EN and more detailed DE, the following difference results:
Two spaces or more at the end of a line do not create a line break.
The # character does not create HTML headings.
No horizontal line is created by three or more hyphens, underscores or asterisks in a line.
You can easily check the output with the following source code:
const
TEST_MARKDOWN: RawUtf8 =
'## Header'#13#10
+ '---'#13#10
+ 'With best regards '#13#10
+ 'Thomas';
var
doc: RawUtf8;
begin
doc := TEST_MARKDOWN;
FileFromString(doc, 'TestRaw.txt');
doc := HtmlEscapeMarkdown(doc);
FileFromString(doc, 'TestMark.txt');
With best regards
Thomas
Offline
The ones mentioned by tbo are standard of almost all. As a well known one, I'd suggest the github md style:
https://docs.github.com/en/get-started/ … ing-syntax
Regards,
Daniel
Offline