[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.125 and 1.126

version 1.125, 2010/12/17 08:17:40 version 1.126, 2010/12/17 10:37:26
Line 1059  mdoc_d1_pre(MDOC_ARGS)
Line 1059  mdoc_d1_pre(MDOC_ARGS)
         /* BLOCKQUOTE needs a block body. */          /* BLOCKQUOTE needs a block body. */
   
         if (MDOC_Dl == n->tok) {          if (MDOC_Dl == n->tok) {
                 PAIR_CLASS_INIT(&tag[1], "lit");                  PAIR_CLASS_INIT(&tag[0], "lit display");
                 print_otag(h, TAG_DIV, 1, tag);                  print_otag(h, TAG_DIV, 1, tag);
         } else          } else
                 print_otag(h, TAG_DIV, 0, tag);                  PAIR_CLASS_INIT(&tag[0], "display");
                   print_otag(h, TAG_DIV, 1, tag);
   
         return(1);          return(1);
 }  }
Line 1103  mdoc_bd_pre(MDOC_ARGS)
Line 1104  mdoc_bd_pre(MDOC_ARGS)
         if (MDOC_HEAD == n->type)          if (MDOC_HEAD == n->type)
                 return(0);                  return(0);
   
         SCALE_VS_INIT(&su, 0);  
   
         assert(n->data.Bd);  
         if (n->data.Bd->offs)  
                 a2offs(n->data.Bd->offs, &su);  
   
         comp = n->data.Bd->comp;  
   
         /* FIXME: -centered, etc. formatting. */  
         /* FIXME: does not respect -offset ??? */  
   
         if (MDOC_BLOCK == n->type) {          if (MDOC_BLOCK == n->type) {
                 bufcat_su(h, "margin-left", &su);                  comp = n->data.Bd->comp;
                 for (nn = n; nn && ! comp; nn = nn->parent) {                  for (nn = n; nn && ! comp; nn = nn->parent) {
                         if (MDOC_BLOCK != nn->type)                          if (MDOC_BLOCK != nn->type)
                                 continue;                                  continue;
Line 1124  mdoc_bd_pre(MDOC_ARGS)
Line 1114  mdoc_bd_pre(MDOC_ARGS)
                         if (nn->prev)                          if (nn->prev)
                                 break;                                  break;
                 }                  }
                 if (comp) {                  if ( ! comp)
                         PAIR_STYLE_INIT(&tag[0], h);                          print_otag(h, TAG_P, 0, NULL);
                         print_otag(h, TAG_DIV, 1, tag);  
                         return(1);  
                 }  
                 SCALE_VS_INIT(&su, 1);  
                 bufcat_su(h, "margin-top", &su);  
                 PAIR_STYLE_INIT(&tag[0], h);  
                 print_otag(h, TAG_DIV, 1, tag);  
                 return(1);                  return(1);
         }          }
   
           SCALE_HS_INIT(&su, 0);
           if (n->data.Bd->offs)
                   a2offs(n->data.Bd->offs, &su);
   
           bufcat_su(h, "margin-left", &su);
           PAIR_STYLE_INIT(&tag[0], h);
   
         if (DISP_unfilled != n->data.Bd->type &&          if (DISP_unfilled != n->data.Bd->type &&
                         DISP_literal != n->data.Bd->type)                          DISP_literal != n->data.Bd->type) {
                   PAIR_CLASS_INIT(&tag[1], "display");
                   print_otag(h, TAG_DIV, 2, tag);
                 return(1);                  return(1);
           }
   
         PAIR_CLASS_INIT(&tag[0], "lit");          PAIR_CLASS_INIT(&tag[1], "lit display");
         bufcat_style(h, "white-space", "pre");          print_otag(h, TAG_PRE, 2, tag);
         PAIR_STYLE_INIT(&tag[1], h);  
         print_otag(h, TAG_DIV, 2, tag);  
   
         for (nn = n->child; nn; nn = nn->next) {          for (nn = n->child; nn; nn = nn->next) {
                 print_mdoc_node(m, nn, h);                  print_mdoc_node(m, nn, h);
Line 1175  mdoc_bd_pre(MDOC_ARGS)
Line 1166  mdoc_bd_pre(MDOC_ARGS)
                 }                  }
                 if (nn->next && nn->next->line == nn->line)                  if (nn->next && nn->next->line == nn->line)
                         continue;                          continue;
                   else if (nn->next)
                           print_text(h, "\n");
   
                 print_text(h, "\n");  
                 h->flags |= HTML_NOSPACE;                  h->flags |= HTML_NOSPACE;
         }          }
   

Legend:
Removed from v.1.125  
changed lines
  Added in v.1.126

CVSweb