public
Description: An implementation of markdown in C, using a PEG grammar
Clone URL: git://github.com/jgm/peg-markdown.git
Search Repo:
Distinguish NormalEndline and TerminalEndline
(chiefly found at end of tight list items).
jgm (author)
Fri May 02 17:08:47 -0700 2008
commit  867af8c9c857006961e750468bf98e72f67d895d
tree    b1dba1b6be7c15f8740b5e7c619c2326ccede12a
parent  c1217ad91a5e37a921916a74657bff4f5fb7c4c0
...
1017
1018
1019
1020
1021
 
 
 
 
 
 
 
1022
1023
1024
...
1017
1018
1019
 
 
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
0
@@ -1017,8 +1017,13 @@ EscapedChar = '\\' !Newline < . >
0
 Entity = ( HexEntity | DecEntity | CharEntity )
0
             { $$ = mk_str(yytext); $$.key = HTML; }
0
 
0
-Endline = Sp Newline !BlankLine
0
- { $$.key = SPACE; $$.contents.str = "\n"; }
0
+Endline = TerminalEndline | NormalEndline
0
+
0
+NormalEndline = Sp Newline !BlankLine
0
+ { $$.key = SPACE; $$.contents.str = "\n"; }
0
+
0
+TerminalEndline = Sp Newline Eof
0
+ { $$.key = SPACE; $$.contents.str = ""; }
0
 
0
 LineBreak = " " Endline
0
             { $$.key = LINEBREAK; }

Comments

    No one has commented yet.