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

Diff for /mandoc/html.c between version 1.208 and 1.210

version 1.208, 2017/03/13 19:01:38 version 1.210, 2017/03/15 11:29:53
Line 28 
Line 28 
 #include <string.h>  #include <string.h>
 #include <unistd.h>  #include <unistd.h>
   
 #include "mandoc.h"  
 #include "mandoc_aux.h"  #include "mandoc_aux.h"
   #include "mandoc.h"
   #include "roff.h"
 #include "out.h"  #include "out.h"
 #include "html.h"  #include "html.h"
 #include "manconf.h"  #include "manconf.h"
Line 236  print_metaf(struct html *h, enum mandoc_esc deco)
Line 237  print_metaf(struct html *h, enum mandoc_esc deco)
         }          }
 }  }
   
   char *
   html_make_id(const struct roff_node *n)
   {
           const struct roff_node  *nch;
           char                    *buf, *cp;
   
           for (nch = n->child; nch != NULL; nch = nch->next)
                   if (nch->type != ROFFT_TEXT)
                           return NULL;
   
           buf = NULL;
           deroff(&buf, n);
   
           /* http://www.w3.org/TR/html5/dom.html#the-id-attribute */
   
           for (cp = buf; *cp != '\0'; cp++)
                   if (*cp == ' ')
                           *cp = '_';
   
           return buf;
   }
   
 int  int
 html_strlen(const char *cp)  html_strlen(const char *cp)
 {  {
Line 591  print_otag(struct html *h, enum htmltag tag, const cha
Line 614  print_otag(struct html *h, enum htmltag tag, const cha
                                 break;                                  break;
                         su = &mysu;                          su = &mysu;
                         a2width(arg2, su);                          a2width(arg2, su);
                           /* Increase width to make even bold text fit. */
                           su->scale *= 1.1;
                         if (fmt[-1] == 'W')                          if (fmt[-1] == 'W')
                                 su->scale *= -1.0;                                  su->scale *= -1.0;
                         break;                          break;

Legend:
Removed from v.1.208  
changed lines
  Added in v.1.210

CVSweb