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

Diff for /mandoc/mdoc_html.c between version 1.303 and 1.304

version 1.303, 2018/05/21 01:11:31 version 1.304, 2018/05/25 20:23:51
Line 502  cond_id(const struct roff_node *n)
Line 502  cond_id(const struct roff_node *n)
              (n->parent->tok == MDOC_Xo &&               (n->parent->tok == MDOC_Xo &&
               n->parent->parent->prev == NULL &&                n->parent->parent->prev == NULL &&
               n->parent->parent->parent->tok == MDOC_It)))                n->parent->parent->parent->tok == MDOC_It)))
                 return html_make_id(n);                  return html_make_id(n, 1);
         return NULL;          return NULL;
 }  }
   
Line 513  mdoc_sh_pre(MDOC_ARGS)
Line 513  mdoc_sh_pre(MDOC_ARGS)
   
         switch (n->type) {          switch (n->type) {
         case ROFFT_HEAD:          case ROFFT_HEAD:
                 id = html_make_id(n);                  id = html_make_id(n, 1);
                 print_otag(h, TAG_H1, "cTi", "Sh", id);                  print_otag(h, TAG_H1, "cTi", "Sh", id);
                 if (id != NULL)                  if (id != NULL)
                         print_otag(h, TAG_A, "chR", "permalink", id);                          print_otag(h, TAG_A, "chR", "permalink", id);
                 free(id);  
                 break;                  break;
         case ROFFT_BODY:          case ROFFT_BODY:
                 if (n->sec == SEC_AUTHORS)                  if (n->sec == SEC_AUTHORS)
Line 537  mdoc_ss_pre(MDOC_ARGS)
Line 536  mdoc_ss_pre(MDOC_ARGS)
         if (n->type != ROFFT_HEAD)          if (n->type != ROFFT_HEAD)
                 return 1;                  return 1;
   
         id = html_make_id(n);          id = html_make_id(n, 1);
         print_otag(h, TAG_H2, "cTi", "Ss", id);          print_otag(h, TAG_H2, "cTi", "Ss", id);
         if (id != NULL)          if (id != NULL)
                 print_otag(h, TAG_A, "chR", "permalink", id);                  print_otag(h, TAG_A, "chR", "permalink", id);
         free(id);  
         return 1;          return 1;
 }  }
   
Line 553  mdoc_fl_pre(MDOC_ARGS)
Line 551  mdoc_fl_pre(MDOC_ARGS)
         if ((id = cond_id(n)) != NULL)          if ((id = cond_id(n)) != NULL)
                 print_otag(h, TAG_A, "chR", "permalink", id);                  print_otag(h, TAG_A, "chR", "permalink", id);
         print_otag(h, TAG_CODE, "cTi", "Fl", id);          print_otag(h, TAG_CODE, "cTi", "Fl", id);
         free(id);  
   
         print_text(h, "\\-");          print_text(h, "\\-");
         if (!(n->child == NULL &&          if (!(n->child == NULL &&
Line 573  mdoc_cm_pre(MDOC_ARGS)
Line 570  mdoc_cm_pre(MDOC_ARGS)
         if ((id = cond_id(n)) != NULL)          if ((id = cond_id(n)) != NULL)
                 print_otag(h, TAG_A, "chR", "permalink", id);                  print_otag(h, TAG_A, "chR", "permalink", id);
         print_otag(h, TAG_CODE, "cTi", "Cm", id);          print_otag(h, TAG_CODE, "cTi", "Cm", id);
         free(id);  
         return 1;          return 1;
 }  }
   
Line 882  mdoc_sx_pre(MDOC_ARGS)
Line 878  mdoc_sx_pre(MDOC_ARGS)
 {  {
         char    *id;          char    *id;
   
         id = html_make_id(n);          id = html_make_id(n, 0);
         print_otag(h, TAG_A, "cThR", "Sx", id);          print_otag(h, TAG_A, "cThR", "Sx", id);
         free(id);          free(id);
         return 1;          return 1;
Line 1030  mdoc_dv_pre(MDOC_ARGS)
Line 1026  mdoc_dv_pre(MDOC_ARGS)
         if ((id = cond_id(n)) != NULL)          if ((id = cond_id(n)) != NULL)
                 print_otag(h, TAG_A, "chR", "permalink", id);                  print_otag(h, TAG_A, "chR", "permalink", id);
         print_otag(h, TAG_CODE, "cTi", "Dv", id);          print_otag(h, TAG_CODE, "cTi", "Dv", id);
         free(id);  
         return 1;          return 1;
 }  }
   
Line 1042  mdoc_ev_pre(MDOC_ARGS)
Line 1037  mdoc_ev_pre(MDOC_ARGS)
         if ((id = cond_id(n)) != NULL)          if ((id = cond_id(n)) != NULL)
                 print_otag(h, TAG_A, "chR", "permalink", id);                  print_otag(h, TAG_A, "chR", "permalink", id);
         print_otag(h, TAG_CODE, "cTi", "Ev", id);          print_otag(h, TAG_CODE, "cTi", "Ev", id);
         free(id);  
         return 1;          return 1;
 }  }
   
Line 1055  mdoc_er_pre(MDOC_ARGS)
Line 1049  mdoc_er_pre(MDOC_ARGS)
             (n->parent->tok == MDOC_It ||              (n->parent->tok == MDOC_It ||
              (n->parent->tok == MDOC_Bq &&               (n->parent->tok == MDOC_Bq &&
               n->parent->parent->parent->tok == MDOC_It)) ?                n->parent->parent->parent->tok == MDOC_It)) ?
             html_make_id(n) : NULL;              html_make_id(n, 1) : NULL;
   
         if (id != NULL)          if (id != NULL)
                 print_otag(h, TAG_A, "chR", "permalink", id);                  print_otag(h, TAG_A, "chR", "permalink", id);
         print_otag(h, TAG_CODE, "cTi", "Er", id);          print_otag(h, TAG_CODE, "cTi", "Er", id);
         free(id);  
         return 1;          return 1;
 }  }
   
Line 1411  mdoc_ic_pre(MDOC_ARGS)
Line 1404  mdoc_ic_pre(MDOC_ARGS)
         if ((id = cond_id(n)) != NULL)          if ((id = cond_id(n)) != NULL)
                 print_otag(h, TAG_A, "chR", "permalink", id);                  print_otag(h, TAG_A, "chR", "permalink", id);
         print_otag(h, TAG_CODE, "cTi", "Ic", id);          print_otag(h, TAG_CODE, "cTi", "Ic", id);
         free(id);  
         return 1;          return 1;
 }  }
   
Line 1464  mdoc_ms_pre(MDOC_ARGS)
Line 1456  mdoc_ms_pre(MDOC_ARGS)
         if ((id = cond_id(n)) != NULL)          if ((id = cond_id(n)) != NULL)
                 print_otag(h, TAG_A, "chR", "permalink", id);                  print_otag(h, TAG_A, "chR", "permalink", id);
         print_otag(h, TAG_SPAN, "cTi", "Ms", id);          print_otag(h, TAG_SPAN, "cTi", "Ms", id);
         free(id);  
         return 1;          return 1;
 }  }
   
Line 1505  mdoc_no_pre(MDOC_ARGS)
Line 1496  mdoc_no_pre(MDOC_ARGS)
         if ((id = cond_id(n)) != NULL)          if ((id = cond_id(n)) != NULL)
                 print_otag(h, TAG_A, "chR", "permalink", id);                  print_otag(h, TAG_A, "chR", "permalink", id);
         print_otag(h, TAG_SPAN, "ci", "No", id);          print_otag(h, TAG_SPAN, "ci", "No", id);
         free(id);  
         return 1;          return 1;
 }  }
   
Line 1517  mdoc_li_pre(MDOC_ARGS)
Line 1507  mdoc_li_pre(MDOC_ARGS)
         if ((id = cond_id(n)) != NULL)          if ((id = cond_id(n)) != NULL)
                 print_otag(h, TAG_A, "chR", "permalink", id);                  print_otag(h, TAG_A, "chR", "permalink", id);
         print_otag(h, TAG_CODE, "ci", "Li", id);          print_otag(h, TAG_CODE, "ci", "Li", id);
         free(id);  
         return 1;          return 1;
 }  }
   

Legend:
Removed from v.1.303  
changed lines
  Added in v.1.304

CVSweb