summaryrefslogtreecommitdiffstats
path: root/src/markdown.cpp
diff options
context:
space:
mode:
authorDimitri van Heesch <doxygen@gmail.com>2020-07-25 17:55:01 (GMT)
committerDimitri van Heesch <doxygen@gmail.com>2020-07-25 17:55:01 (GMT)
commitab7dfc4d6de5a65946e5c0e54eab6fe21e7e44eb (patch)
treeb8420332e98808c22572dd8cf8af2e979444e341 /src/markdown.cpp
parent483b47ddd8039ba77aacc11d35825489f74b3b47 (diff)
parent47addccf4632f510f19b73ba5cbdbe011513d30f (diff)
downloadDoxygen-ab7dfc4d6de5a65946e5c0e54eab6fe21e7e44eb.zip
Doxygen-ab7dfc4d6de5a65946e5c0e54eab6fe21e7e44eb.tar.gz
Doxygen-ab7dfc4d6de5a65946e5c0e54eab6fe21e7e44eb.tar.bz2
Merge branch 'feature/issue_7787' of https://github.com/albert-github/doxygen into albert-github-feature/issue_7787
Diffstat (limited to 'src/markdown.cpp')
-rw-r--r--src/markdown.cpp20
1 files changed, 17 insertions, 3 deletions
diff --git a/src/markdown.cpp b/src/markdown.cpp
index 4f40f8d..34a9935 100644
--- a/src/markdown.cpp
+++ b/src/markdown.cpp
@@ -79,6 +79,15 @@
data[i]=='\\' || \
data[i]=='@')
+inline int isNewline(const char *data)
+{
+ // plain return
+ if (data[0] == '\n') return(1);
+ // doxygen return from ^^ in ALIASES
+ if (data[0] == '\\' && data[1] == '\\' && data[2] == '_' && data[3] == 'l' && data[4] == 'i' &&
+ data[5] == 'n' && data[6] == 'e' && data[7] == 'b' && data[8] == 'r') return(9);
+ return(0);
+}
//----------
struct TableCell
@@ -1603,8 +1612,10 @@ int findTableColumns(const char *data,int size,int &start,int &end,int &columns)
start = i;
// find end character of the table line
- while (i<size && data[i]!='\n') i++;
- eol=i+1;
+ int j = 0;
+ while (i<size && !(j = isNewline(data + i))) i++;
+ eol=i+j;
+
i--;
while (i>0 && data[i]==' ') i--;
if (i>0 && data[i-1]!='\\' && data[i]=='|') i--,n++; // trailing or escaped | does not count
@@ -2039,7 +2050,9 @@ void Markdown::findEndOfLine(const char *data,int size,
// find end of the line
int nb=0;
end=i+1;
- while (end<=size && data[end-1]!='\n')
+ //while (end<=size && data[end-1]!='\n')
+ int j = 0;
+ while (end<=size && !(j = isNewline(data+end-1)))
{
// while looking for the end of the line we might encounter a block
// that needs to be passed unprocessed.
@@ -2100,6 +2113,7 @@ void Markdown::findEndOfLine(const char *data,int size,
end++;
}
}
+ if (j) end += j-1;
//printf("findEndOfLine pi=%d i=%d end=%d {%s}\n",pi,i,end,QCString(data+i).left(end-i).data());
}