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

Diff for /mandoc/eqn_html.c between version 1.14 and 1.18

version 1.14, 2017/06/23 23:00:01 version 1.18, 2018/12/13 05:23:38
Line 26 
Line 26 
 #include <string.h>  #include <string.h>
   
 #include "mandoc.h"  #include "mandoc.h"
   #include "eqn.h"
 #include "out.h"  #include "out.h"
 #include "html.h"  #include "html.h"
   
Line 51  eqn_box(struct html *p, const struct eqn_box *bp)
Line 52  eqn_box(struct html *p, const struct eqn_box *bp)
         if (EQN_MATRIX == bp->type) {          if (EQN_MATRIX == bp->type) {
                 if (NULL == bp->first)                  if (NULL == bp->first)
                         goto out;                          goto out;
                 if (EQN_LIST != bp->first->type) {                  if (bp->first->type != EQN_LIST ||
                       bp->first->expectargs == 1) {
                         eqn_box(p, bp->first);                          eqn_box(p, bp->first);
                         goto out;                          goto out;
                 }                  }
Line 131  eqn_box(struct html *p, const struct eqn_box *bp)
Line 133  eqn_box(struct html *p, const struct eqn_box *bp)
   
         if (EQN_PILE == bp->type) {          if (EQN_PILE == bp->type) {
                 assert(NULL == post);                  assert(NULL == post);
                 if (bp->first != NULL && bp->first->type == EQN_LIST)                  if (bp->first != NULL &&
                       bp->first->type == EQN_LIST &&
                       bp->first->expectargs > 1)
                         post = print_otag(p, TAG_MTABLE, "");                          post = print_otag(p, TAG_MTABLE, "");
         } else if (bp->type == EQN_LIST &&          } else if (bp->type == EQN_LIST && bp->expectargs > 1 &&
             bp->parent && bp->parent->type == EQN_PILE) {              bp->parent && bp->parent->type == EQN_PILE) {
                 assert(NULL == post);                  assert(NULL == post);
                 post = print_otag(p, TAG_MTR, "");                  post = print_otag(p, TAG_MTR, "");
Line 224  out:
Line 228  out:
 }  }
   
 void  void
 print_eqn(struct html *p, const struct eqn *ep)  print_eqn(struct html *p, const struct eqn_box *bp)
 {  {
         struct tag      *t;          struct tag      *t;
   
           if (bp->first == NULL)
                   return;
   
         t = print_otag(p, TAG_MATH, "c", "eqn");          t = print_otag(p, TAG_MATH, "c", "eqn");
   
         p->flags |= HTML_NONOSPACE;          p->flags |= HTML_NONOSPACE;
         eqn_box(p, ep->root);          eqn_box(p, bp);
         p->flags &= ~HTML_NONOSPACE;          p->flags &= ~HTML_NONOSPACE;
   
         print_tagq(p, t);          print_tagq(p, t);

Legend:
Removed from v.1.14  
changed lines
  Added in v.1.18

CVSweb