diff options
author | albert-github <albert.tests@gmail.com> | 2019-01-11 10:08:36 (GMT) |
---|---|---|
committer | albert-github <albert.tests@gmail.com> | 2019-01-11 10:08:36 (GMT) |
commit | 5697a9e8dbb298aede810c1ce6daded80bf40952 (patch) | |
tree | 8e3275de2a7a3329a83e5094dea2b740ca1e0606 /src | |
parent | 121ec253945f6563ac6731e3596cd9beaa39cb72 (diff) | |
download | Doxygen-5697a9e8dbb298aede810c1ce6daded80bf40952.zip Doxygen-5697a9e8dbb298aede810c1ce6daded80bf40952.tar.gz Doxygen-5697a9e8dbb298aede810c1ce6daded80bf40952.tar.bz2 |
No translation of markdown in <pre>
According to the documentation:
Doxygen does not have this requirement, and will also process Markdown formatting inside such HTML blocks. The
only exception is <pre> blocks, which are passed untouched (handy for ASCII art).
Though in case the `</pre>` is the last statement in a non block type comment the markdown is processed. C has block type /* ... */ and /// is translated to this, Fortran, Python are line type comments.
Adding a `\n` at the when no `\n` is present at the end solves the problem.
Diffstat (limited to 'src')
-rw-r--r-- | src/markdown.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/markdown.cpp b/src/markdown.cpp index 5253333..181b01a 100644 --- a/src/markdown.cpp +++ b/src/markdown.cpp @@ -2535,7 +2535,9 @@ QCString processMarkdown(const QCString &fileName,const int lineNr,Entry *e,cons out.clear(); int refIndent; // for replace tabs by spaces - QCString s = detab(input,refIndent); + QCString s = input; + if (s.find('\n',s.length()-1) == -1) s += "\n"; + s = detab(s,refIndent); //printf("======== DeTab =========\n---- output -----\n%s\n---------\n",s.data()); // then process quotation blocks (as these may contain other blocks) s = processQuotations(s,refIndent); |