From 3df31762585075033a04e40c3cdfb52781aa258f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lien=20G=C3=A2teau?= Date: Tue, 4 Feb 2014 14:03:30 +0100 Subject: 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. --- src/markdown.cpp | 2 +- testing/055/md_055_markdown.xml | 19 +++++++++++++++++++ testing/055_markdown.md | 12 ++++++++++++ 3 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 testing/055/md_055_markdown.xml create mode 100644 testing/055_markdown.md 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 @@ + + + + md_055_markdown + 055_markdown + + // objective: test markdown parsing // check: md_055_markdown.xml + + Inline link + + + Reference link + + + Upper-cased reference link on last line + + + + 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 -- cgit v0.12