summaryrefslogtreecommitdiffstats
path: root/src/markdown.cpp
diff options
context:
space:
mode:
authorDimitri van Heesch <dimitri@stack.nl>2014-02-06 20:25:32 (GMT)
committerDimitri van Heesch <dimitri@stack.nl>2014-02-06 20:25:32 (GMT)
commit4d1951ebb648bbc92464904305cafc7fc0dba557 (patch)
tree1e3988536ffb36d7fcd723e3255308a0ec583167 /src/markdown.cpp
parent0178674db5f4391e41c389d21f42656684939167 (diff)
downloadDoxygen-4d1951ebb648bbc92464904305cafc7fc0dba557.zip
Doxygen-4d1951ebb648bbc92464904305cafc7fc0dba557.tar.gz
Doxygen-4d1951ebb648bbc92464904305cafc7fc0dba557.tar.bz2
Bug 723299 - Last line of code block lost if it is only one character and there is no text afterward
Diffstat (limited to 'src/markdown.cpp')
-rw-r--r--src/markdown.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/markdown.cpp b/src/markdown.cpp
index 6c7c349..7db955f 100644
--- a/src/markdown.cpp
+++ b/src/markdown.cpp
@@ -1725,7 +1725,7 @@ static int writeBlockQuote(GrowBuf &out,const char *data,int size)
{
// find end of this line
end=i+1;
- while (end<size && data[end-1]!='\n') end++;
+ while (end<=size && data[end-1]!='\n') end++;
int j=i;
int level=0;
int indent=i;
@@ -1781,7 +1781,7 @@ static int writeCodeBlock(GrowBuf &out,const char *data,int size,int refIndent)
{
// find end of this line
end=i+1;
- while (end<size && data[end-1]!='\n') end++;
+ while (end<=size && data[end-1]!='\n') end++;
int j=i;
int indent=0;
while (j<end && data[j]==' ') j++,indent++;
@@ -1828,7 +1828,7 @@ static void findEndOfLine(GrowBuf &out,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')
{
// while looking for the end of the line we might encounter a block
// that needs to be passed unprocessed.
@@ -1892,12 +1892,12 @@ static void findEndOfLine(GrowBuf &out,const char *data,int size,
}
else if (nb==0 && data[end-1]=='`')
{
- while (end<size && data[end-1]=='`') end++,nb++;
+ while (end<=size && data[end-1]=='`') end++,nb++;
}
else if (nb>0 && data[end-1]=='`')
{
int enb=0;
- while (end<size && data[end-1]=='`') end++,enb++;
+ while (end<=size && data[end-1]=='`') end++,enb++;
if (enb==nb) nb=0;
}
else
@@ -1968,7 +1968,7 @@ static QCString processBlocks(const QCString &s,int indent)
// get indent for the first line
end = i+1;
int sp=0;
- while (end<size && data[end-1]!='\n')
+ while (end<=size && data[end-1]!='\n')
{
if (data[end-1]==' ') sp++;
end++;