[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.340 and 1.343

version 1.340, 2020/04/19 15:16:56 version 1.343, 2022/06/24 11:15:53
Line 1 
Line 1 
 /* $Id$ */  /* $Id$ */
 /*  /*
  * Copyright (c) 2014-2020 Ingo Schwarze <schwarze@openbsd.org>   * Copyright (c) 2014-2021 Ingo Schwarze <schwarze@openbsd.org>
  * Copyright (c) 2008-2011, 2014 Kristaps Dzonsons <kristaps@bsd.lv>   * Copyright (c) 2008-2011, 2014 Kristaps Dzonsons <kristaps@bsd.lv>
  *   *
  * Permission to use, copy, modify, and distribute this software for any   * Permission to use, copy, modify, and distribute this software for any
Line 349  print_mdoc_node(MDOC_ARGS)
Line 349  print_mdoc_node(MDOC_ARGS)
         if (n->type == ROFFT_COMMENT || n->flags & NODE_NOPRT)          if (n->type == ROFFT_COMMENT || n->flags & NODE_NOPRT)
                 return;                  return;
   
         if (n->flags & NODE_NOFILL) {          if ((n->flags & NODE_NOFILL) == 0)
                 html_fillmode(h, ROFF_nf);  
                 if (n->flags & NODE_LINE)  
                         print_endline(h);  
         } else  
                 html_fillmode(h, ROFF_fi);                  html_fillmode(h, ROFF_fi);
           else if (html_fillmode(h, ROFF_nf) == ROFF_nf &&
               n->tok != ROFF_fi && n->flags & NODE_LINE)
                   print_endline(h);
   
         child = 1;          child = 1;
         n->flags &= ~NODE_ENDED;          n->flags &= ~NODE_ENDED;
Line 516  static int
Line 515  static int
 mdoc_sh_pre(MDOC_ARGS)  mdoc_sh_pre(MDOC_ARGS)
 {  {
         struct roff_node        *sn, *subn;          struct roff_node        *sn, *subn;
         struct tag              *t, *tsec, *tsub;          struct tag              *t, *tnav, *tsec, *tsub;
         char                    *id;          char                    *id;
         int                      sc;          int                      sc;
   
Line 537  mdoc_sh_pre(MDOC_ARGS)
Line 536  mdoc_sh_pre(MDOC_ARGS)
                                         break;                                          break;
                 if (sc < 2)                  if (sc < 2)
                         break;                          break;
                   tnav = print_otag(h, TAG_NAV, "r", "doc-toc");
                 t = print_otag(h, TAG_H1, "c", "Sh");                  t = print_otag(h, TAG_H1, "c", "Sh");
                 print_text(h, "TABLE OF CONTENTS");                  print_text(h, "TABLE OF CONTENTS");
                 print_tagq(h, t);                  print_tagq(h, t);
Line 568  mdoc_sh_pre(MDOC_ARGS)
Line 568  mdoc_sh_pre(MDOC_ARGS)
                         }                          }
                         print_tagq(h, tsec);                          print_tagq(h, tsec);
                 }                  }
                 print_tagq(h, t);                  print_tagq(h, tnav);
                 print_otag(h, TAG_SECTION, "c", "Sh");                  print_otag(h, TAG_SECTION, "c", "Sh");
                 break;                  break;
         case ROFFT_HEAD:          case ROFFT_HEAD:
Line 931  mdoc_sx_pre(MDOC_ARGS)
Line 931  mdoc_sx_pre(MDOC_ARGS)
 static int  static int
 mdoc_bd_pre(MDOC_ARGS)  mdoc_bd_pre(MDOC_ARGS)
 {  {
         char                     buf[16];          char                     buf[20];
         struct roff_node        *nn;          struct roff_node        *nn;
         int                      comp;          int                      comp;
   
Line 967  mdoc_bd_pre(MDOC_ARGS)
Line 967  mdoc_bd_pre(MDOC_ARGS)
         if (n->norm->Bd.offs != NULL &&          if (n->norm->Bd.offs != NULL &&
             strcmp(n->norm->Bd.offs, "left") != 0)              strcmp(n->norm->Bd.offs, "left") != 0)
                 (void)strlcat(buf, " Bd-indent", sizeof(buf));                  (void)strlcat(buf, " Bd-indent", sizeof(buf));
   
           if (n->norm->Bd.type == DISP_literal)
                   (void)strlcat(buf, " Li", sizeof(buf));
   
         print_otag_id(h, TAG_DIV, buf, n);          print_otag_id(h, TAG_DIV, buf, n);
         return 1;          return 1;

Legend:
Removed from v.1.340  
changed lines
  Added in v.1.343

CVSweb