diff options
author | albert-github <albert.tests@gmail.com> | 2019-11-12 17:08:22 (GMT) |
---|---|---|
committer | albert-github <albert.tests@gmail.com> | 2019-11-12 17:08:22 (GMT) |
commit | 6b821a1da54e558947b631a7d2b836c8aa6935e7 (patch) | |
tree | 8f091866126d77cec3498054fe8fb4c23274241a /src | |
parent | 502d7aa8101222b6fdd7fe3c5b56869f3efff195 (diff) | |
download | Doxygen-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')
-rw-r--r-- | src/markdown.cpp | 2 |
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) |