summaryrefslogtreecommitdiffstats
path: root/src/markdown.cpp
diff options
context:
space:
mode:
authoralbert-github <albert.tests@gmail.com>2020-10-26 12:59:45 (GMT)
committeralbert-github <albert.tests@gmail.com>2020-10-26 12:59:45 (GMT)
commitf674f5bbe7fdec97d8567b7256312d24a49ed924 (patch)
tree59a94ab7b51b999c1c076d37d3d94133f7cbaeaa /src/markdown.cpp
parent49bd996c0e05df763632c346038a2346174f7382 (diff)
downloadDoxygen-f674f5bbe7fdec97d8567b7256312d24a49ed924.zip
Doxygen-f674f5bbe7fdec97d8567b7256312d24a49ed924.tar.gz
Doxygen-f674f5bbe7fdec97d8567b7256312d24a49ed924.tar.bz2
issue #8130 Markdown relative links - not working for other folders
Always convert links to absolute path even when path exists
Diffstat (limited to 'src/markdown.cpp')
-rw-r--r--src/markdown.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/markdown.cpp b/src/markdown.cpp
index 207aa14..33245e1 100644
--- a/src/markdown.cpp
+++ b/src/markdown.cpp
@@ -1046,7 +1046,11 @@ int Markdown::processLink(const char *data,int,int size)
if (!(Portable::isAbsolutePath(link) || isURL(link)))
{
QFileInfo forg(link);
- if (!(forg.exists() && forg.isReadable()))
+ if (forg.exists() && forg.isReadable())
+ {
+ link = forg.absFilePath().data();
+ }
+ else if (!(forg.exists() && forg.isReadable()))
{
QFileInfo fi(m_fileName);
QCString mdFile = m_fileName.left(m_fileName.length()-fi.fileName().length()) + link;
@@ -2073,7 +2077,7 @@ void Markdown::writeOneLineHeaderOrRuler(const char *data,int size)
int tmpSize = size;
if (data[size-1] == '\n') tmpSize--;
m_out.addStr(data,tmpSize);
-
+
if (hasLineBreak(data,size))
{
m_out.addStr("<br>");