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

Diff for /mandoc/term.c between version 1.179 and 1.180

version 1.179, 2011/03/17 08:49:34 version 1.180, 2011/03/17 09:16:38
Line 463  term_word(struct termp *p, const char *word)
Line 463  term_word(struct termp *p, const char *word)
   
         sv = word;          sv = word;
   
         if (word[0] && '\0' == word[1])          if (DELIM_CLOSE == mandoc_isdelim(word))
                 switch (word[0]) {                  if ( ! (TERMP_IGNDELIM & p->flags))
                 case('.'):                          p->flags |= TERMP_NOSPACE;
                         /* FALLTHROUGH */  
                 case(','):  
                         /* FALLTHROUGH */  
                 case(';'):  
                         /* FALLTHROUGH */  
                 case(':'):  
                         /* FALLTHROUGH */  
                 case('?'):  
                         /* FALLTHROUGH */  
                 case('!'):  
                         /* FALLTHROUGH */  
                 case(')'):  
                         /* FALLTHROUGH */  
                 case(']'):  
                         if ( ! (TERMP_IGNDELIM & p->flags))  
                                 p->flags |= TERMP_NOSPACE;  
                         break;  
                 default:  
                         break;  
                 }  
   
         if ( ! (TERMP_NOSPACE & p->flags)) {          if ( ! (TERMP_NOSPACE & p->flags)) {
                 if ( ! (TERMP_KEEP & p->flags)) {                  if ( ! (TERMP_KEEP & p->flags)) {
Line 548  term_word(struct termp *p, const char *word)
Line 528  term_word(struct termp *p, const char *word)
                         p->flags |= TERMP_NOSPACE;                          p->flags |= TERMP_NOSPACE;
         }          }
   
         /*          if (DELIM_OPEN == mandoc_isdelim(sv))
          * Note that we don't process the pipe: the parser sees it as                  p->flags |= TERMP_NOSPACE;
          * punctuation, but we don't in terms of typography.  
          */  
         if (sv[0] && '\0' == sv[1])  
                 switch (sv[0]) {  
                 case('('):  
                         /* FALLTHROUGH */  
                 case('['):  
                         p->flags |= TERMP_NOSPACE;  
                         break;  
                 default:  
                         break;  
                 }  
 }  }
   
   

Legend:
Removed from v.1.179  
changed lines
  Added in v.1.180

CVSweb