From 33c29dccd16d96b3a5c29fa476e8e9ce376134cd Mon Sep 17 00:00:00 2001 From: albert-github Date: Sun, 18 Oct 2020 18:53:02 +0200 Subject: Miscounting in markdown in case of a horizontal ruler. When having code like: ``` A horizonal ruler by means of underscores \aa2 ____ \aa4 A horizonal ruler by means of hyphens \bb7 - --- \bb9 A horizonal ruler by means of asterisks \cc12 **** \cc14 ``` we get wanungs like: ``` .../aa.md:2: warning: Found unknown command '\aa2' .../aa.md:5: warning: Found unknown command '\aa4' .../aa.md:8: warning: Found unknown command '\bb7' .../aa.md:11: warning: Found unknown command '\bb9' .../aa.md:14: warning: Found unknown command '\cc12' .../aa.md:17: warning: Found unknown command '\cc14' ``` instead of ``` .../aa.md:2: warning: Found unknown command '\aa2' .../aa.md:4: warning: Found unknown command '\aa4' .../aa.md:7: warning: Found unknown command '\bb7' .../aa.md:9: warning: Found unknown command '\bb9' .../aa.md:12: warning: Found unknown command '\cc12' .../aa.md:14: warning: Found unknown command '\cc14' ``` This has been fixed. --- src/markdown.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/markdown.cpp b/src/markdown.cpp index 930efd6..20dc9ab 100644 --- a/src/markdown.cpp +++ b/src/markdown.cpp @@ -2033,7 +2033,7 @@ void Markdown::writeOneLineHeaderOrRuler(const char *data,int size) QCString id; if (isHRuler(data,size)) { - m_out.addStr("\n
\n"); + m_out.addStr("
\n"); } else if ((level=isAtxHeader(data,size,header,id,TRUE))) { -- cgit v0.12 From 4aa74abe0835b2430e51dc628c10f2e04b9b894b Mon Sep 17 00:00:00 2001 From: albert-github Date: Sun, 18 Oct 2020 19:07:51 +0200 Subject: Incomplete documentation in respect to hyphens for horizontal rulers In case of a sequence of hyphens the documentation was incomplete. (found during implementation of "Miscounting in markdown in case of a horizontal ruler", #8115) --- doc/markdown.doc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/doc/markdown.doc b/doc/markdown.doc index 883e831..eba9431 100644 --- a/doc/markdown.doc +++ b/doc/markdown.doc @@ -155,7 +155,10 @@ Examples: ______ Note that using asterisks in comment blocks does not work. See -\ref mddox_stars for details. +\ref mddox_stars for details.
+Note that when using hyphens and the previous line is not empty you have to +use at least one whitespace in the sequence of hyphens otherwise it might be +seen as a level 2 header (see \ref md_headers). \subsection md_emphasis Emphasis -- cgit v0.12 From 39db9f48e6376b62f28c9b85320dd62f76547765 Mon Sep 17 00:00:00 2001 From: albert-github Date: Mon, 19 Oct 2020 14:24:08 +0200 Subject: Miscounting of line in case of markdown `\ref` image In case we have: ``` The page \aa2 Doxygen's Doxygen Documentation: \aa2 \aa3 \aa4 ![Caption text](@ref https://codedocs.xyz/doxygen/doxygen.svg) \aa4 \aa5 ![Caption text](@ref https://codedocs.xyz/doxygen/doxygen.svg) \aa9 ``` we get the warnings: ``` .../aa.md:2: warning: Found unknown command '\aa2' .../aa.md:2: warning: Found unknown command '\aa2' .../aa.md:3: warning: Found unknown command '\aa3' .../aa.md:4: warning: Found unknown command '\aa4' .../aa.md:8: warning: Found unknown command '\aa4' .../aa.md:9: warning: Found unknown command '\aa5' .../aa.md:17: warning: Found unknown command '\aa9' ``` instead of the expected ``` .../aa.md:2: warning: Found unknown command '\aa2' .../aa.md:2: warning: Found unknown command '\aa2' .../aa.md:3: warning: Found unknown command '\aa3' .../aa.md:4: warning: Found unknown command '\aa4' .../aa.md:4: warning: Found unknown command '\aa4' .../aa.md:5: warning: Found unknown command '\aa5' .../aa.md:9: warning: Found unknown command '\aa9' ``` this is due to the fact that the markdown convertor adds some extra line wit `\n` instead of an internal line break `\ilinebr`. --- src/markdown.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/markdown.cpp b/src/markdown.cpp index 930efd6..e5edccc 100644 --- a/src/markdown.cpp +++ b/src/markdown.cpp @@ -784,7 +784,7 @@ void Markdown::writeMarkdownImage(const char *fmt, bool explicitTitle, m_out.addStr(title); m_out.addStr("\""); } - m_out.addStr("\n"); + m_out.addStr("\\ilinebr"); } int Markdown::processLink(const char *data,int,int size) -- cgit v0.12