public
Description: An implementation of markdown in C, using a PEG grammar
Clone URL: git://github.com/jgm/peg-markdown.git
Search Repo:
Fixed bug in listitem output for latex and groff-mm.
Improved padding of list items in latex.
jgm (author)
Thu May 15 15:23:54 -0700 2008
commit  f61057a6e36131e9efb1b6904bdadf429c18e931
tree    574b42ec6fc6f2451455e7f041f3d748347e3004
parent  da766a92fac1bc6a6b1dd93fb075345dbdf4d2ca
...
469
470
471
 
472
473
474
475
...
477
478
479
 
480
481
482
483
484
485
486
487
488
489
490
491
492
 
 
 
493
494
495
496
...
696
697
698
699
700
701
702
703
704
705
706
707
708
 
709
710
711
...
469
470
471
472
473
474
475
476
...
478
479
480
481
482
483
484
485
486
487
 
 
 
 
 
 
 
488
489
490
491
492
493
494
...
694
695
696
 
 
 
 
697
 
 
 
 
 
698
699
700
701
0
@@ -469,6 +469,7 @@
0
         printf("\\begin{itemize}");
0
         padded = 0;
0
         print_latex_element_list(elt.children);
0
+ pad(1);
0
         printf("\\end{itemize}");
0
         padded = 0;
0
         break;
0
0
@@ -477,19 +478,16 @@
0
         printf("\\begin{enumerate}");
0
         padded = 0;
0
         print_latex_element_list(elt.children);
0
+ pad(1);
0
         printf("\\end{enumerate}");
0
         padded = 0;
0
         break;
0
     case LISTITEM:
0
         pad(1);
0
         printf("\\item ");
0
- /* \001 is used to indicate boundaries between nested lists when there
0
- * is no blank line. We split the string by \001 and parse
0
- * each chunk separately. */
0
- contents = strtok(elt.contents.str, "\001");
0
- print_latex_element(markdown(contents, extensions));
0
- while ((contents = strtok(NULL, "\001")))
0
- print_latex_element(markdown(contents, extensions));
0
+ padded = 2;
0
+ print_latex_element_list(elt.children);
0
+ printf("\n");
0
         break;
0
     case BLOCKQUOTE:
0
         pad(1);
0
0
@@ -696,16 +694,8 @@
0
         pad(1);
0
         printf(".LI\n");
0
         in_list_item = true;
0
- /* \001 is used to indicate boundaries between nested lists when there
0
- * is no blank line. We split the string by \001 and parse
0
- * each chunk separately. */
0
- contents = strtok(elt.contents.str, "\001");
0
         padded = 2;
0
- print_groff_mm_element(markdown(contents, extensions), 1);
0
- while ((contents = strtok(NULL, "\001"))) {
0
- padded = 2;
0
- print_groff_mm_element(markdown(contents, extensions), 1);
0
- }
0
+ print_groff_mm_element_list(elt.children);
0
         in_list_item = false;
0
         break;
0
     case BLOCKQUOTE:

Comments

    No one has commented yet.