[BACK]Return to html.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / mandoc

Diff for /src/usr.bin/mandoc/html.c between version 1.138 and 1.139

version 1.138, 2020/04/08 11:54:14 version 1.139, 2020/04/18 20:28:46
Line 876 
Line 876 
 void  void
 print_text(struct html *h, const char *word)  print_text(struct html *h, const char *word)
 {  {
           print_tagged_text(h, word, NULL);
   }
   
   void
   print_tagged_text(struct html *h, const char *word, struct roff_node *n)
   {
           struct tag      *t;
           char            *href;
   
         /*          /*
          * Always wrap text in a paragraph unless already contained in           * Always wrap text in a paragraph unless already contained in
          * some flow container; never put it directly into a section.           * some flow container; never put it directly into a section.
Line 896 
Line 905 
         }          }
   
         /*          /*
          * Print the text, optionally surrounded by HTML whitespace,           * Optionally switch fonts, optionally write a permalink, then
          * optionally manually switching fonts before and after.           * print the text, optionally surrounded by HTML whitespace.
          */           */
   
         assert(h->metaf == NULL);          assert(h->metaf == NULL);
         print_metaf(h);          print_metaf(h);
         print_indent(h);          print_indent(h);
   
           if (n != NULL && (href = html_make_id(n, 0)) != NULL) {
                   t = print_otag(h, TAG_A, "chR", "permalink", href);
                   free(href);
           } else
                   t = NULL;
   
         if ( ! print_encode(h, word, NULL, 0)) {          if ( ! print_encode(h, word, NULL, 0)) {
                 if ( ! (h->flags & HTML_NONOSPACE))                  if ( ! (h->flags & HTML_NONOSPACE))
                         h->flags &= ~HTML_NOSPACE;                          h->flags &= ~HTML_NOSPACE;
Line 913 
Line 929 
         if (h->metaf != NULL) {          if (h->metaf != NULL) {
                 print_tagq(h, h->metaf);                  print_tagq(h, h->metaf);
                 h->metaf = NULL;                  h->metaf = NULL;
         }          } else if (t != NULL)
                   print_tagq(h, t);
   
         h->flags &= ~HTML_IGNDELIM;          h->flags &= ~HTML_IGNDELIM;
 }  }

Legend:
Removed from v.1.138  
changed lines
  Added in v.1.139