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

Diff for /mandoc/man_html.c between version 1.170 and 1.172

version 1.170, 2019/01/18 14:36:21 version 1.172, 2019/03/01 10:57:18
Line 233  print_man_node(MAN_ARGS)
Line 233  print_man_node(MAN_ARGS)
   
         /* This will automatically close out any font scope. */          /* This will automatically close out any font scope. */
         t->refcnt--;          t->refcnt--;
         print_stagq(h, t);          if (n->type == ROFFT_BLOCK &&
               (n->tok == MAN_IP || n->tok == MAN_TP || n->tok == MAN_TQ)) {
                   t = h->tag;
                   while (t->tag != TAG_DL)
                           t = t->next;
                   /*
                    * Close the list if no further item of the same type
                    * follows; otherwise, close the item only.
                    */
                   if (n->next == NULL ||
                       (n->tok == MAN_IP && n->next->tok != MAN_IP) ||
                       (n->tok != MAN_IP &&
                        n->next->tok != MAN_TP && n->next->tok != MAN_TQ)) {
                           print_tagq(h, t);
                           t = NULL;
                   }
           }
           if (t != NULL)
                   print_stagq(h, t);
   
         if (n->flags & NODE_NOFILL && n->tok != MAN_YS &&          if (n->flags & NODE_NOFILL && n->tok != MAN_YS &&
             (n->next != NULL && n->next->flags & NODE_LINE)) {              (n->next != NULL && n->next->flags & NODE_LINE)) {
Line 292  man_root_post(const struct roff_meta *man, struct html
Line 310  man_root_post(const struct roff_meta *man, struct html
 static int  static int
 man_SH_pre(MAN_ARGS)  man_SH_pre(MAN_ARGS)
 {  {
         char    *id;          const char      *class;
           char            *id;
           enum htmltag     tag;
   
           if (n->tok == MAN_SH) {
                   tag = TAG_H1;
                   class = "Sh";
           } else {
                   tag = TAG_H2;
                   class = "Ss";
           }
         switch (n->type) {          switch (n->type) {
         case ROFFT_BLOCK:          case ROFFT_BLOCK:
                 html_close_paragraph(h);                  html_close_paragraph(h);
                   print_otag(h, TAG_SECTION, "c", class);
                 break;                  break;
         case ROFFT_HEAD:          case ROFFT_HEAD:
                 id = html_make_id(n, 1);                  id = html_make_id(n, 1);
                 if (n->tok == MAN_SH)                  print_otag(h, tag, "ci", class, id);
                         print_otag(h, TAG_H1, "ci", "Sh", id);  
                 else  
                         print_otag(h, TAG_H2, "ci", "Ss", id);  
                 if (id != NULL)                  if (id != NULL)
                         print_otag(h, TAG_A, "chR", "permalink", id);                          print_otag(h, TAG_A, "chR", "permalink", id);
                 break;                  break;
Line 399  man_IP_pre(MAN_ARGS)
Line 424  man_IP_pre(MAN_ARGS)
         switch (n->type) {          switch (n->type) {
         case ROFFT_BLOCK:          case ROFFT_BLOCK:
                 html_close_paragraph(h);                  html_close_paragraph(h);
                 print_otag(h, TAG_DL, "c", "Bl-tag");                  /*
                    * Open a new list unless there is an immediately
                    * preceding item of the same type.
                    */
                   if (n->prev == NULL ||
                       (n->tok == MAN_IP && n->prev->tok != MAN_IP) ||
                       (n->tok != MAN_IP &&
                        n->prev->tok != MAN_TP && n->prev->tok != MAN_TQ))
                           print_otag(h, TAG_DL, "c", "Bl-tag");
                 return 1;                  return 1;
         case ROFFT_HEAD:          case ROFFT_HEAD:
                 print_otag(h, TAG_DT, "");                  print_otag(h, TAG_DT, "");

Legend:
Removed from v.1.170  
changed lines
  Added in v.1.172

CVSweb