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

Diff for /mandoc/tbl_data.c between version 1.57 and 1.59

version 1.57, 2021/09/07 11:48:19 version 1.59, 2021/09/10 13:24:38
Line 147  getdata(struct tbl_node *tbl, struct tbl_span *dp,
Line 147  getdata(struct tbl_node *tbl, struct tbl_span *dp,
                 dp->last->next = dat;                  dp->last->next = dat;
         dp->last = dat;          dp->last = dat;
   
           /* Strip leading and trailing spaces, if requested. */
   
           endpos = *pos;
           if (dp->opts->opts & TBL_OPT_NOSPACE) {
                   while (p[startpos] == ' ')
                           startpos++;
                   while (endpos > startpos && p[endpos - 1] == ' ')
                           endpos--;
           }
   
         /*          /*
          * Check for a continued-data scope opening.  This consists of a           * Check for a continued-data scope opening.  This consists of a
          * trailing `T{' at the end of the line.  Subsequent lines,           * trailing `T{' at the end of the line.  Subsequent lines,
          * until a standalone `T}', are included in our cell.           * until a standalone `T}', are included in our cell.
          */           */
   
         if (*pos - startpos == 2 &&          if (endpos - startpos == 2 &&
             p[startpos] == 'T' && p[startpos + 1] == '{') {              p[startpos] == 'T' && p[startpos + 1] == '{') {
                 tbl->part = TBL_PART_CDATA;                  tbl->part = TBL_PART_CDATA;
                 return;                  return;
         }          }
   
         endpos = *pos;  
         if (dp->opts->opts & TBL_OPT_NOSPACE) {  
                 while (p[startpos] == ' ')  
                         startpos++;  
                 while (endpos > startpos && p[endpos - 1] == ' ')  
                         endpos--;  
         }  
         dat->string = mandoc_strndup(p + startpos, endpos - startpos);          dat->string = mandoc_strndup(p + startpos, endpos - startpos);
   
         if (p[*pos] != '\0')          if (p[*pos] != '\0')
Line 200  tbl_cdata(struct tbl_node *tbl, int ln, const char *p,
Line 203  tbl_cdata(struct tbl_node *tbl, int ln, const char *p,
   
         if (p[pos] == 'T' && p[pos + 1] == '}') {          if (p[pos] == 'T' && p[pos + 1] == '}') {
                 pos += 2;                  pos += 2;
                   if (tbl->opts.opts & TBL_OPT_NOSPACE)
                           while (p[pos] == ' ')
                                   pos++;
                 if (p[pos] == tbl->opts.tab) {                  if (p[pos] == tbl->opts.tab) {
                         tbl->part = TBL_PART_DATA;                          tbl->part = TBL_PART_DATA;
                         pos++;                          pos++;

Legend:
Removed from v.1.57  
changed lines
  Added in v.1.59

CVSweb