From 5697a9e8dbb298aede810c1ce6daded80bf40952 Mon Sep 17 00:00:00 2001 From: albert-github Date: Fri, 11 Jan 2019 11:08:36 +0100 Subject: No translation of markdown in

According to the documentation:
Doxygen does not have this requirement, and will also process Markdown formatting inside such HTML blocks. The
only exception is 
 blocks, which are passed untouched (handy for ASCII art).

Though in case the `
` 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. --- src/markdown.cpp | 4 ++- testing/081/081__markdown__pre_8f90.xml | 51 +++++++++++++++++++++++++++++++++ testing/081_markdown_pre.f90 | 18 ++++++++++++ 3 files changed, 72 insertions(+), 1 deletion(-) create mode 100755 testing/081/081__markdown__pre_8f90.xml create mode 100755 testing/081_markdown_pre.f90 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); diff --git a/testing/081/081__markdown__pre_8f90.xml b/testing/081/081__markdown__pre_8f90.xml new file mode 100755 index 0000000..7c713cf --- /dev/null +++ b/testing/081/081__markdown__pre_8f90.xml @@ -0,0 +1,51 @@ + + + + 081_markdown_pre.f90 + + + subroutine + subroutine subr1 + () + subr1 + + subr1 + + + + + ___________________________ + + + + + + + + + subroutine + subroutine subr2 + () + subr2 + + subr2 + + + + + ___________________________ + + + + + + + + + + + + + + + diff --git a/testing/081_markdown_pre.f90 b/testing/081_markdown_pre.f90 new file mode 100755 index 0000000..590bbbf --- /dev/null +++ b/testing/081_markdown_pre.f90 @@ -0,0 +1,18 @@ +! // objective: test
 in Fortran, no translation of markdown
+! // check: 081__markdown__pre_8f90.xml
+!> \file
+
+!> subr1
+!>
+!>                     ___________________________
+!>
+subroutine subr1() +end subroutine + +!> subr2 +!>
+!>                     ___________________________
+!>
+!> +subroutine subr2() +end subroutine -- cgit v0.12