public
Description: An implementation of markdown in C, using a PEG grammar
Clone URL: git://github.com/jgm/peg-markdown.git
Search Repo:
Modified BlockQuote parser to handle "lazy" syntax,
where the '>' is not repeated.
jgm (author)
Thu May 15 22:48:59 -0700 2008
commit  a2e3e304e279d7e63b645ee0ab07af0c81d5a88e
tree    3ee83fd0399fa2a10e3fe53b00753f267cdc218f
parent  0f7d17cb4d21585897b6246fe519657d5b9bb44a
...
292
293
294
295
 
 
 
 
 
296
297
298
...
292
293
294
 
295
296
297
298
299
300
301
302
0
@@ -292,7 +292,11 @@
0
                 $$.children = raw;
0
              }
0
 
0
-BlockQuoteRaw = a:StartList ( '>' ' '? Line { pushelt($$, &a); } )+
0
+BlockQuoteRaw = a:StartList
0
+ (( '>' ' '? Line { pushelt($$, &a); } )
0
+ ( !'>' !BlankLine Line { pushelt($$, &a); } )*
0
+ ( BlankLine { pushelt($$, &a); } )*
0
+ )+
0
                  { char *c = concat_string_list(reverse(a.children));
0
                      strcat(c, "\n"); /* Note: an extra byte was allocated for this */
0
                      $$ = mk_str(c);

Comments

    No one has commented yet.