[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.288 and 1.289

version 1.288, 2017/05/17 17:54:45 version 1.289, 2017/05/30 16:31:29
Line 1309  mdoc_pp_pre(MDOC_ARGS)
Line 1309  mdoc_pp_pre(MDOC_ARGS)
 static int  static int
 mdoc_lk_pre(MDOC_ARGS)  mdoc_lk_pre(MDOC_ARGS)
 {  {
           const struct roff_node *link, *descr, *punct;
         struct tag      *t;          struct tag      *t;
   
         if ((n = n->child) == NULL)          if ((link = n->child) == NULL)
                 return 0;                  return 0;
   
           /* Find beginning of trailing punctuation. */
           punct = n->last;
           while (punct != link && punct->flags & NODE_DELIMC)
                   punct = punct->prev;
           punct = punct->next;
   
         /* Link target and link text. */          /* Link target and link text. */
         t = print_otag(h, TAG_A, "cTh", "Lk", n->string);          t = print_otag(h, TAG_A, "cTh", "Lk", link->string);
         if (n->next == NULL || n->next->flags & NODE_DELIMC)          for (descr = link->next; descr != punct; descr = descr->next) {
                 print_text(h, n->string);                  if (descr->flags & (NODE_DELIMC | NODE_DELIMO))
         for (n = n->next; n != NULL && !(n->flags & NODE_DELIMC); n = n->next)                          h->flags |= HTML_NOSPACE;
                 print_text(h, n->string);                  print_text(h, descr->string);
           }
         print_tagq(h, t);          print_tagq(h, t);
   
         /* Trailing punctuation. */          /* Trailing punctuation. */
         while (n != NULL) {          while (punct != NULL) {
                 h->flags |= HTML_NOSPACE;                  h->flags |= HTML_NOSPACE;
                 print_text(h, n->string);                  print_text(h, punct->string);
                 n = n->next;                  punct = punct->next;
         }          }
         return 0;          return 0;
 }  }

Legend:
Removed from v.1.288  
changed lines
  Added in v.1.289

CVSweb