[BACK]Return to mdoc_markdown.c CVS log [TXT][DIR] Up to [cvsweb.bsd.lv] / mandoc

Diff for /mandoc/mdoc_markdown.c between version 1.2 and 1.3

version 1.2, 2017/03/04 21:41:29 version 1.3, 2017/03/06 14:58:10
Line 220  static const struct md_act md_acts[MDOC_MAX + 1] = {
Line 220  static const struct md_act md_acts[MDOC_MAX + 1] = {
         { NULL, NULL, md_post_pc, NULL, NULL }, /* %Q */          { NULL, NULL, md_post_pc, NULL, NULL }, /* %Q */
         { NULL, md_pre_br, NULL, NULL, NULL }, /* br */          { NULL, md_pre_br, NULL, NULL, NULL }, /* br */
         { NULL, md_pre_Pp, NULL, NULL, NULL }, /* sp */          { NULL, md_pre_Pp, NULL, NULL, NULL }, /* sp */
         { NULL, NULL, md_post_pc, NULL, NULL }, /* %U */          { NULL, md_pre_Lk, md_post_pc, NULL, NULL }, /* %U */
         { NULL, NULL, NULL, NULL, NULL }, /* Ta */          { NULL, NULL, NULL, NULL, NULL }, /* Ta */
         { NULL, NULL, NULL, NULL, NULL }, /* ll */          { NULL, NULL, NULL, NULL, NULL }, /* ll */
         { NULL, NULL, NULL, NULL, NULL }, /* ROOT */          { NULL, NULL, NULL, NULL, NULL }, /* ROOT */
Line 1235  static int
Line 1235  static int
 md_pre_Lk(struct roff_node *n)  md_pre_Lk(struct roff_node *n)
 {  {
         const struct roff_node *link, *descr;          const struct roff_node *link, *descr;
           const unsigned char *s;
   
         if ((link = n->child) == NULL)          if ((link = n->child) == NULL)
                 return 0;                  return 0;
Line 1251  md_pre_Lk(struct roff_node *n)
Line 1252  md_pre_Lk(struct roff_node *n)
         } else          } else
                 md_rawword("<");                  md_rawword("<");
   
         outflags &= ~MD_spc;          for (s = link->string; *s != '\0'; s++) {
         md_word(link->string);                  if (strchr("%)<>", *s) != NULL) {
                           printf("%%%2.2hhX", *s);
                           outcount += 3;
                   } else {
                           putchar(*s);
                           outcount++;
                   }
           }
   
         outflags &= ~MD_spc;          outflags &= ~MD_spc;
         md_rawword(link->next == NULL ? ">" : ")");          md_rawword(link->next == NULL ? ">" : ")");
         return 0;          return 0;

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

CVSweb