summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAurélien Gâteau <agateau@kde.org>2014-02-04 13:03:30 (GMT)
committerAurélien Gâteau <agateau@kde.org>2014-02-04 13:32:14 (GMT)
commit3df31762585075033a04e40c3cdfb52781aa258f (patch)
tree591f173596f94aa6132c94fecd912124b612a1d3
parentbe7a6bf70f440124bc205e02f456e2178696e207 (diff)
downloadDoxygen-3df31762585075033a04e40c3cdfb52781aa258f.zip
Doxygen-3df31762585075033a04e40c3cdfb52781aa258f.tar.gz
Doxygen-3df31762585075033a04e40c3cdfb52781aa258f.tar.bz2
Make sure all ids in g_linkRefs are lower case
Ids created from the last line were not lower-cased, leading to the link not being recognized.
-rw-r--r--src/markdown.cpp2
-rw-r--r--testing/055/md_055_markdown.xml19
-rw-r--r--testing/055_markdown.md12
3 files changed, 32 insertions, 1 deletions
diff --git a/src/markdown.cpp b/src/markdown.cpp
index 85d3c83..af1e56d 100644
--- a/src/markdown.cpp
+++ b/src/markdown.cpp
@@ -2101,7 +2101,7 @@ static QCString processBlocks(const QCString &s,int indent)
{
//printf("found link ref: id='%s' link='%s' title='%s'\n",
// id.data(),link.data(),title.data());
- g_linkRefs.insert(id,new LinkRef(link,title));
+ g_linkRefs.insert(id.lower(),new LinkRef(link,title));
}
else
{
diff --git a/testing/055/md_055_markdown.xml b/testing/055/md_055_markdown.xml
new file mode 100644
index 0000000..87f3c04
--- /dev/null
+++ b/testing/055/md_055_markdown.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<doxygen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="compound.xsd" version="">
+ <compounddef id="md_055_markdown" kind="page">
+ <compoundname>md_055_markdown</compoundname>
+ <title>055_markdown</title>
+ <detaileddescription>
+ <para>// objective: test markdown parsing // check: md_055_markdown.xml</para>
+ <para>
+ <ulink url="http://example.com/inline">Inline link</ulink>
+ </para>
+ <para>
+ <ulink url="http://example.com/reference">Reference link</ulink>
+ </para>
+ <para>
+ <ulink url="http://example.com/last-line">Upper-cased reference link on last line</ulink>
+ </para>
+ </detaileddescription>
+ </compounddef>
+</doxygen>
diff --git a/testing/055_markdown.md b/testing/055_markdown.md
new file mode 100644
index 0000000..957d194
--- /dev/null
+++ b/testing/055_markdown.md
@@ -0,0 +1,12 @@
+// objective: test markdown parsing
+// check: md_055_markdown.xml
+
+[Inline link](http://example.com/inline)
+
+[Reference link][1]
+
+[1]: http://example.com/reference
+
+[Upper-cased reference link on last line][U]
+
+[U]: http://example.com/last-line