[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.233

version 1.229, 2018/05/25 20:23:51 version 1.233, 2018/06/18 01:49:15
Line 1 
Line 1 
 /*      $Id$ */  /*      $OpenBSD$ */
 /*  /*
  * Copyright (c) 2008-2011, 2014 Kristaps Dzonsons <kristaps@bsd.lv>   * Copyright (c) 2008-2011, 2014 Kristaps Dzonsons <kristaps@bsd.lv>
  * Copyright (c) 2011-2015, 2017, 2018 Ingo Schwarze <schwarze@openbsd.org>   * Copyright (c) 2011-2015, 2017, 2018 Ingo Schwarze <schwarze@openbsd.org>
Line 287  html_make_id(const struct roff_node *n, int unique)
Line 287  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 694  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 701  print_otag(struct html *h, enum htmltag tag, const cha
Line 701  print_otag(struct html *h, enum htmltag tag, const cha
                                         /* Add padding. */                                          /* Add padding. */
                                         su->scale += 3.0;                                          su->scale += 3.0;
                                 }                                  }
                                 fmt++;  
                         }  
                         if (*fmt == '-') {  
                                 if (su != NULL)  
                                         su->scale *= -1.0;  
                                 fmt++;                                  fmt++;
                         }                          }
                         break;                          break;

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

CVSweb