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

version 1.288, 2017/05/17 17:54:45 version 1.291, 2017/06/24 14:38:32
Line 27 
Line 27 
 #include <unistd.h>  #include <unistd.h>
   
 #include "mandoc_aux.h"  #include "mandoc_aux.h"
   #include "mandoc.h"
 #include "roff.h"  #include "roff.h"
 #include "mdoc.h"  #include "mdoc.h"
 #include "out.h"  #include "out.h"
Line 1309  mdoc_pp_pre(MDOC_ARGS)
Line 1310  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);          descr = link->next;
         if (n->next == NULL || n->next->flags & NODE_DELIMC)          if (descr == punct)
                 print_text(h, n->string);                  descr = link;  /* no text */
         for (n = n->next; n != NULL && !(n->flags & NODE_DELIMC); n = n->next)          t = print_otag(h, TAG_A, "cTh", "Lk", link->string);
                 print_text(h, n->string);          do {
                   if (descr->flags & (NODE_DELIMC | NODE_DELIMO))
                           h->flags |= HTML_NOSPACE;
                   print_text(h, descr->string);
                   descr = descr->next;
           } while (descr != punct);
         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.291

CVSweb