|
80 | 80 | data[i]=='\\' || \
|
81 | 81 | data[i]=='@')
|
82 | 82 |
|
| 83 | +inline int isNewline(const char *data) |
| 84 | +{ |
| 85 | + // plain return |
| 86 | + if (data[0] == '\n') return(1); |
| 87 | + // doxygen return from ^^ in ALIASES |
| 88 | + if (data[0] == '\\' && data[1] == '\\' && data[2] == '_' && data[3] == 'l' && data[4] == 'i' && |
| 89 | + data[5] == 'n' && data[6] == 'e' && data[7] == 'b' && data[8] == 'r') return(9); |
| 90 | + return(0); |
| 91 | +} |
83 | 92 | //----------
|
84 | 93 |
|
85 | 94 | struct LinkRef
|
@@ -1594,8 +1603,10 @@ int findTableColumns(const char *data,int size,int &start,int &end,int &columns)
|
1594 | 1603 | start = i;
|
1595 | 1604 |
|
1596 | 1605 | // find end character of the table line
|
1597 |
| - while (i<size && data[i]!='\n') i++; |
1598 |
| - eol=i+1; |
| 1606 | + int j = 0; |
| 1607 | + while (i<size && !(j = isNewline(data + i))) i++; |
| 1608 | + eol=i+j; |
| 1609 | + |
1599 | 1610 | i--;
|
1600 | 1611 | while (i>0 && data[i]==' ') i--;
|
1601 | 1612 | if (i>0 && data[i-1]!='\\' && data[i]=='|') i--,n++; // trailing or escaped | does not count
|
@@ -2120,7 +2131,9 @@ static void findEndOfLine(GrowBuf &out,const char *data,int size,
|
2120 | 2131 | // find end of the line
|
2121 | 2132 | int nb=0;
|
2122 | 2133 | end=i+1;
|
2123 |
| - while (end<=size && data[end-1]!='\n') |
| 2134 | + //while (end<=size && data[end-1]!='\n') |
| 2135 | + int j = 0; |
| 2136 | + while (end<=size && !(j = isNewline(data+end-1))) |
2124 | 2137 | {
|
2125 | 2138 | // while looking for the end of the line we might encounter a block
|
2126 | 2139 | // that needs to be passed unprocessed.
|
@@ -2181,6 +2194,7 @@ static void findEndOfLine(GrowBuf &out,const char *data,int size,
|
2181 | 2194 | end++;
|
2182 | 2195 | }
|
2183 | 2196 | }
|
| 2197 | + if (j) end += j-1; |
2184 | 2198 | //printf("findEndOfLine pi=%d i=%d end=%d {%s}\n",pi,i,end,QCString(data+i).left(end-i).data());
|
2185 | 2199 | }
|
2186 | 2200 |
|
|
0 commit comments