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

Diff for /mandoc/html.c between version 1.229 and 1.235

version 1.229, 2018/05/25 20:23:51 version 1.235, 2018/06/25 13:45:57
Line 69  static const struct htmldata htmltags[TAG_MAX] = {
Line 69  static const struct htmldata htmltags[TAG_MAX] = {
         {"br",          HTML_NOSTACK | HTML_AUTOCLOSE | HTML_NLALL},          {"br",          HTML_NOSTACK | HTML_AUTOCLOSE | HTML_NLALL},
         {"a",           0},          {"a",           0},
         {"table",       HTML_NLALL | HTML_INDENT},          {"table",       HTML_NLALL | HTML_INDENT},
         {"colgroup",    HTML_NLALL | HTML_INDENT},  
         {"col",         HTML_NOSTACK | HTML_AUTOCLOSE | HTML_NLALL},  
         {"tr",          HTML_NLALL | HTML_INDENT},          {"tr",          HTML_NLALL | HTML_INDENT},
         {"td",          HTML_NLAROUND},          {"td",          HTML_NLAROUND},
         {"li",          HTML_NLAROUND | HTML_INDENT},          {"li",          HTML_NLAROUND | HTML_INDENT},
Line 287  html_make_id(const struct roff_node *n, int unique)
Line 285  html_make_id(const struct roff_node *n, int unique)
         if (buf == NULL)          if (buf == NULL)
                 return NULL;                  return NULL;
   
         /* http://www.w3.org/TR/html5/dom.html#the-id-attribute */          /*
            * In ID attributes, only use ASCII characters that are
            * permitted in URL-fragment strings according to the
            * explicit list at:
            * https://url.spec.whatwg.org/#url-fragment-string
            */
   
         for (cp = buf; *cp != '\0'; cp++)          for (cp = buf; *cp != '\0'; cp++)
                 if (*cp == ' ')                  if (isalnum((unsigned char)*cp) == 0 &&
                       strchr("!$&'()*+,-./:;=?@_~", *cp) == NULL)
                         *cp = '_';                          *cp = '_';
   
         if (unique == 0)          if (unique == 0)
Line 688  print_otag(struct html *h, enum htmltag tag, const cha
Line 692  print_otag(struct html *h, enum htmltag tag, const cha
                                 su = &mysu;                                  su = &mysu;
                                 a2width(arg2, su);                                  a2width(arg2, su);
                         }                          }
                         if (*fmt == '*') {  
                                 if (su != NULL && su->unit == SCALE_EN &&  
                                     su->scale > 5.9 && su->scale < 6.1)  
                                         su = NULL;  
                                 fmt++;  
                         }  
                         if (*fmt == '+') {                          if (*fmt == '+') {
                                 if (su != NULL) {                                  if (su != NULL) {
                                         /* Make even bold text fit. */                                          /* Make even bold text fit. */
Line 703  print_otag(struct html *h, enum htmltag tag, const cha
Line 701  print_otag(struct html *h, enum htmltag tag, const cha
                                 }                                  }
                                 fmt++;                                  fmt++;
                         }                          }
                         if (*fmt == '-') {  
                                 if (su != NULL)  
                                         su->scale *= -1.0;  
                                 fmt++;  
                         }  
                         break;                          break;
                 default:                  default:
                         abort();                          abort();
Line 718  print_otag(struct html *h, enum htmltag tag, const cha
Line 711  print_otag(struct html *h, enum htmltag tag, const cha
                 switch (*fmt++) {                  switch (*fmt++) {
                 case 'h':                  case 'h':
                         attr = "height";                          attr = "height";
                         break;  
                 case 'i':  
                         attr = "text-indent";  
                         break;                          break;
                 case 'l':                  case 'l':
                         attr = "margin-left";                          attr = "margin-left";

Legend:
Removed from v.1.229  
changed lines
  Added in v.1.235

CVSweb