[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.169 and 1.171

version 1.169, 2019/01/11 16:36:19 version 1.171, 2019/02/28 16:36:13
Line 168  print_man_node(MAN_ARGS)
Line 168  print_man_node(MAN_ARGS)
         html_fillmode(h, n->flags & NODE_NOFILL ? ROFF_nf : ROFF_fi);          html_fillmode(h, n->flags & NODE_NOFILL ? ROFF_nf : ROFF_fi);
   
         child = 1;          child = 1;
         t = h->tag;  
         if (t->tag == TAG_P || t->tag == TAG_PRE)  
                 t = t->next;  
   
         switch (n->type) {          switch (n->type) {
         case ROFFT_TEXT:          case ROFFT_TEXT:
                 if (*n->string == '\0') {                  if (*n->string == '\0') {
Line 183  print_man_node(MAN_ARGS)
Line 179  print_man_node(MAN_ARGS)
                         print_endline(h);                          print_endline(h);
                 else if (n->flags & NODE_DELIMC)                  else if (n->flags & NODE_DELIMC)
                         h->flags |= HTML_NOSPACE;                          h->flags |= HTML_NOSPACE;
                   t = h->tag;
                   t->refcnt++;
                 print_text(h, n->string);                  print_text(h, n->string);
                 break;                  break;
         case ROFFT_EQN:          case ROFFT_EQN:
                   t = h->tag;
                   t->refcnt++;
                 print_eqn(h, n->eqn);                  print_eqn(h, n->eqn);
                 break;                  break;
         case ROFFT_TBL:          case ROFFT_TBL:
Line 211  print_man_node(MAN_ARGS)
Line 211  print_man_node(MAN_ARGS)
                  * the "meta" table state.  This will be reopened on the                   * the "meta" table state.  This will be reopened on the
                  * next table element.                   * next table element.
                  */                   */
                 if (h->tblt != NULL) {                  if (h->tblt != NULL)
                         print_tblclose(h);                          print_tblclose(h);
                         t = h->tag;                  t = h->tag;
                 }                  t->refcnt++;
                 if (n->tok < ROFF_MAX) {                  if (n->tok < ROFF_MAX) {
                         roff_html_pre(h, n);                          roff_html_pre(h, n);
                           t->refcnt--;
                         print_stagq(h, t);                          print_stagq(h, t);
                         return;                          return;
                 }                  }
Line 231  print_man_node(MAN_ARGS)
Line 232  print_man_node(MAN_ARGS)
                 print_man_nodelist(man, n->child, h);                  print_man_nodelist(man, n->child, h);
   
         /* This will automatically close out any font scope. */          /* This will automatically close out any font scope. */
         print_stagq(h, t);          t->refcnt--;
           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 397  man_IP_pre(MAN_ARGS)
Line 417  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.169  
changed lines
  Added in v.1.171

CVSweb