[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.298 and 1.299

version 1.298, 2018/05/08 17:52:55 version 1.299, 2018/05/08 21:42:34
Line 1 
Line 1 
 /*      $Id$ */  /*      $Id$ */
 /*  /*
  * Copyright (c) 2008-2011, 2014 Kristaps Dzonsons <kristaps@bsd.lv>   * Copyright (c) 2008-2011, 2014 Kristaps Dzonsons <kristaps@bsd.lv>
  * Copyright (c) 2014, 2015, 2016, 2017 Ingo Schwarze <schwarze@openbsd.org>   * Copyright (c) 2014,2015,2016,2017,2018 Ingo Schwarze <schwarze@openbsd.org>
  *   *
  * Permission to use, copy, modify, and distribute this software for any   * Permission to use, copy, modify, and distribute this software for any
  * purpose with or without fee is hereby granted, provided that the above   * purpose with or without fee is hereby granted, provided that the above
Line 668  mdoc_it_pre(MDOC_ARGS)
Line 668  mdoc_it_pre(MDOC_ARGS)
 {  {
         const struct roff_node  *bl;          const struct roff_node  *bl;
         struct tag              *t;          struct tag              *t;
         const char              *cattr;  
         enum mdoc_list           type;          enum mdoc_list           type;
   
         bl = n->parent;          bl = n->parent;
Line 678  mdoc_it_pre(MDOC_ARGS)
Line 677  mdoc_it_pre(MDOC_ARGS)
   
         switch (type) {          switch (type) {
         case LIST_bullet:          case LIST_bullet:
                 cattr = "It-bullet";  
                 break;  
         case LIST_dash:          case LIST_dash:
         case LIST_hyphen:          case LIST_hyphen:
                 cattr = "It-dash";  
                 break;  
         case LIST_item:          case LIST_item:
                 cattr = "It-item";  
                 break;  
         case LIST_enum:          case LIST_enum:
                 cattr = "It-enum";  
                 break;  
         case LIST_diag:  
                 cattr = "It-diag";  
                 break;  
         case LIST_hang:  
                 cattr = "It-hang";  
                 break;  
         case LIST_inset:  
                 cattr = "It-inset";  
                 break;  
         case LIST_ohang:  
                 cattr = "It-ohang";  
                 break;  
         case LIST_tag:  
                 cattr = "It-tag";  
                 break;  
         case LIST_column:  
                 cattr = "It-column";  
                 break;  
         default:  
                 break;  
         }  
   
         switch (type) {  
         case LIST_bullet:  
         case LIST_dash:  
         case LIST_hyphen:  
         case LIST_item:  
         case LIST_enum:  
                 switch (n->type) {                  switch (n->type) {
                 case ROFFT_HEAD:                  case ROFFT_HEAD:
                         return 0;                          return 0;
                 case ROFFT_BODY:                  case ROFFT_BODY:
                         print_otag(h, TAG_LI, "c", cattr);                          print_otag(h, TAG_LI, "");
                         break;                          break;
                 default:                  default:
                         break;                          break;
Line 734  mdoc_it_pre(MDOC_ARGS)
Line 697  mdoc_it_pre(MDOC_ARGS)
         case LIST_ohang:          case LIST_ohang:
                 switch (n->type) {                  switch (n->type) {
                 case ROFFT_HEAD:                  case ROFFT_HEAD:
                         print_otag(h, TAG_DT, "c", cattr);                          print_otag(h, TAG_DT, "");
                         if (type == LIST_diag)  
                                 print_otag(h, TAG_B, "c", cattr);  
                         break;                          break;
                 case ROFFT_BODY:                  case ROFFT_BODY:
                         print_otag(h, TAG_DD, "csw*+l", cattr,                          print_otag(h, TAG_DD, "sw*+l", bl->norm->Bl.width);
                             bl->norm->Bl.width);  
                         break;                          break;
                 default:                  default:
                         break;                          break;
Line 753  mdoc_it_pre(MDOC_ARGS)
Line 713  mdoc_it_pre(MDOC_ARGS)
                             (n->parent->prev == NULL ||                              (n->parent->prev == NULL ||
                              n->parent->prev->body == NULL ||                               n->parent->prev->body == NULL ||
                              n->parent->prev->body->child != NULL)) {                               n->parent->prev->body->child != NULL)) {
                                 t = print_otag(h, TAG_DT, "csw*+-l",                                  t = print_otag(h, TAG_DT, "sw*+-l",
                                     cattr, bl->norm->Bl.width);                                      bl->norm->Bl.width);
                                 print_text(h, "\\ ");                                  print_text(h, "\\ ");
                                 print_tagq(h, t);                                  print_tagq(h, t);
                                 t = print_otag(h, TAG_DD, "c", cattr);                                  t = print_otag(h, TAG_DD, "");
                                 print_text(h, "\\ ");                                  print_text(h, "\\ ");
                                 print_tagq(h, t);                                  print_tagq(h, t);
                         }                          }
                         print_otag(h, TAG_DT, "csw*+-l", cattr,                          print_otag(h, TAG_DT, "sw*+-l", bl->norm->Bl.width);
                             bl->norm->Bl.width);  
                         break;                          break;
                 case ROFFT_BODY:                  case ROFFT_BODY:
                         if (n->child == NULL) {                          if (n->child == NULL) {
                                 print_otag(h, TAG_DD, "css?", cattr,                                  print_otag(h, TAG_DD, "ss?",
                                     "width", "auto");                                      "width", "auto");
                                 print_text(h, "\\ ");                                  print_text(h, "\\ ");
                         } else                          } else
                                 print_otag(h, TAG_DD, "c", cattr);                                  print_otag(h, TAG_DD, "");
                         break;                          break;
                 default:                  default:
                         break;                          break;
Line 781  mdoc_it_pre(MDOC_ARGS)
Line 740  mdoc_it_pre(MDOC_ARGS)
                 case ROFFT_HEAD:                  case ROFFT_HEAD:
                         break;                          break;
                 case ROFFT_BODY:                  case ROFFT_BODY:
                         print_otag(h, TAG_TD, "c", cattr);                          print_otag(h, TAG_TD, "");
                         break;                          break;
                 default:                  default:
                         print_otag(h, TAG_TR, "c", cattr);                          print_otag(h, TAG_TR, "");
                 }                  }
         default:          default:
                 break;                  break;

Legend:
Removed from v.1.298  
changed lines
  Added in v.1.299

CVSweb