summaryrefslogtreecommitdiffstats
path: root/src/markdown.cpp
diff options
context:
space:
mode:
authoralbert-github <albert.tests@gmail.com>2019-11-12 17:08:22 (GMT)
committeralbert-github <albert.tests@gmail.com>2019-11-12 17:08:22 (GMT)
commit6b821a1da54e558947b631a7d2b836c8aa6935e7 (patch)
tree8f091866126d77cec3498054fe8fb4c23274241a /src/markdown.cpp
parent502d7aa8101222b6fdd7fe3c5b56869f3efff195 (diff)
downloadDoxygen-6b821a1da54e558947b631a7d2b836c8aa6935e7.zip
Doxygen-6b821a1da54e558947b631a7d2b836c8aa6935e7.tar.gz
Doxygen-6b821a1da54e558947b631a7d2b836c8aa6935e7.tar.bz2
Problem with horizontal ruler directly after fenced code section
When having a fenced code block directly followed by a horizontal ruler like: ``` ~~~ B ~~~ --- ``` we get the warning: ``` bb.md:5: warning: unexpected command endcode ``` due to the fact that the markdown parser replaces the `~~~` by a `@code` / `endcode` block and then handles the horizontal ruler `---` but this is seen as a level 2 header on the previous part resulting in the markdown code: ``` @page md_bb bb @subsection autotoc_md0 @code B @endcode ``` The problem also occurs when a fenced code block is created with back tics. By adding a `\n` this problem is fixed.
Diffstat (limited to 'src/markdown.cpp')
-rw-r--r--src/markdown.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/markdown.cpp b/src/markdown.cpp
index f6720ea..e054941 100644
--- a/src/markdown.cpp
+++ b/src/markdown.cpp
@@ -2176,7 +2176,7 @@ static void writeFencedCodeBlock(GrowBuf &out,const char *data,const char *lng,
}
out.addStr(data+blockStart,blockEnd-blockStart);
out.addStr("\n");
- out.addStr("@endcode");
+ out.addStr("@endcode\n");
}
static QCString processQuotations(const QCString &s,int refIndent)