From dc438879c6bb1475add244b381cb6671316c850c Mon Sep 17 00:00:00 2001 From: Dimitri van Heesch Date: Sun, 13 Jan 2019 11:03:12 +0100 Subject: Merge: moved example from 081 to 084, improved check if last char is newline --- src/markdown.cpp | 2 +- testing/081/081__markdown__pre_8f90.xml | 51 --------------------------------- testing/081_brief_lists.h | 0 testing/081_markdown_pre.f90 | 18 ------------ testing/084/084__markdown__pre_8f90.xml | 51 +++++++++++++++++++++++++++++++++ testing/084_markdown_pre.f90 | 18 ++++++++++++ 6 files changed, 70 insertions(+), 70 deletions(-) delete mode 100755 testing/081/081__markdown__pre_8f90.xml mode change 100755 => 100644 testing/081_brief_lists.h delete mode 100755 testing/081_markdown_pre.f90 create mode 100755 testing/084/084__markdown__pre_8f90.xml create mode 100644 testing/084_markdown_pre.f90 diff --git a/src/markdown.cpp b/src/markdown.cpp index 181b01a..74492ea 100644 --- a/src/markdown.cpp +++ b/src/markdown.cpp @@ -2536,7 +2536,7 @@ QCString processMarkdown(const QCString &fileName,const int lineNr,Entry *e,cons int refIndent; // for replace tabs by spaces QCString s = input; - if (s.find('\n',s.length()-1) == -1) s += "\n"; + if (s.at(s.length()-1)!='\n') s += "\n"; // see PR #6766 s = detab(s,refIndent); //printf("======== DeTab =========\n---- output -----\n%s\n---------\n",s.data()); // then process quotation blocks (as these may contain other blocks) diff --git a/testing/081/081__markdown__pre_8f90.xml b/testing/081/081__markdown__pre_8f90.xml deleted file mode 100755 index 7c713cf..0000000 --- a/testing/081/081__markdown__pre_8f90.xml +++ /dev/null @@ -1,51 +0,0 @@ - - - - 081_markdown_pre.f90 - - - subroutine - subroutine subr1 - () - subr1 - - subr1 - - - - - ___________________________ - - - - - - - - - subroutine - subroutine subr2 - () - subr2 - - subr2 - - - - - ___________________________ - - - - - - - - - - - - - - - diff --git a/testing/081_brief_lists.h b/testing/081_brief_lists.h old mode 100755 new mode 100644 diff --git a/testing/081_markdown_pre.f90 b/testing/081_markdown_pre.f90 deleted file mode 100755 index 590bbbf..0000000 --- a/testing/081_markdown_pre.f90 +++ /dev/null @@ -1,18 +0,0 @@ -! // 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 diff --git a/testing/084/084__markdown__pre_8f90.xml b/testing/084/084__markdown__pre_8f90.xml new file mode 100755 index 0000000..8a59bd9 --- /dev/null +++ b/testing/084/084__markdown__pre_8f90.xml @@ -0,0 +1,51 @@ + + + + 084_markdown_pre.f90 + + + subroutine + subroutine subr1 + () + subr1 + + subr1 + + + + + ___________________________ + + + + + + + + + subroutine + subroutine subr2 + () + subr2 + + subr2 + + + + + ___________________________ + + + + + + + + + + + + + + + diff --git a/testing/084_markdown_pre.f90 b/testing/084_markdown_pre.f90 new file mode 100644 index 0000000..1760b67 --- /dev/null +++ b/testing/084_markdown_pre.f90 @@ -0,0 +1,18 @@ +! // objective: test
 in Fortran, no translation of markdown
+! // check: 084__markdown__pre_8f90.xml
+!> \file
+
+!> subr1
+!>
+!>                     ___________________________
+!>
+subroutine subr1() +end subroutine + +!> subr2 +!>
+!>                     ___________________________
+!>
+!> +subroutine subr2() +end subroutine -- cgit v0.12