summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDimitri van Heesch <doxygen@gmail.com>2018-10-13 14:37:00 (GMT)
committerGitHub <noreply@github.com>2018-10-13 14:37:00 (GMT)
commitf5eceb842ecf9da4131b283183d31a99a750b3b7 (patch)
tree8ebe4566137e66ccfa33ea26ba671cf0fe1b60e2 /src
parent3e72c16f32605a893b27d39a43162f02caefe753 (diff)
parentdee50d6921e2f6fe2a0dd2e9b50fa51cd1fc4c60 (diff)
downloadDoxygen-f5eceb842ecf9da4131b283183d31a99a750b3b7.zip
Doxygen-f5eceb842ecf9da4131b283183d31a99a750b3b7.tar.gz
Doxygen-f5eceb842ecf9da4131b283183d31a99a750b3b7.tar.bz2
Merge pull request #6535 from albert-github/feature/issue_6524
issue_6524: Markdown formats missing in doxygen outputs.
Diffstat (limited to 'src')
-rw-r--r--src/markdown.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/markdown.cpp b/src/markdown.cpp
index f812d96..afa39cb 100644
--- a/src/markdown.cpp
+++ b/src/markdown.cpp
@@ -396,9 +396,11 @@ static int processEmphasis2(GrowBuf &out, const char *data, int size, char c)
data[i-1]!='\n'
)
{
- out.addStr("<strong>");
+ if (c == '~') out.addStr("<strike>");
+ else out.addStr("<strong>");
processInline(out,data,i);
- out.addStr("</strong>");
+ if (c == '~') out.addStr("</strike>");
+ else out.addStr("</strong>");
return i + 2;
}
i++;
@@ -616,7 +618,7 @@ static int processEmphasis(GrowBuf &out,const char *data,int offset,int size)
char c = data[0];
int ret;
- if (size>2 && data[1]!=c) // _bla or *bla
+ if (size>2 && c!='~' && data[1]!=c) // _bla or *bla
{
// whitespace cannot follow an opening emphasis
if (data[1]==' ' || data[1]=='\n' ||
@@ -635,7 +637,7 @@ static int processEmphasis(GrowBuf &out,const char *data,int offset,int size)
}
return ret+2;
}
- if (size>4 && data[1]==c && data[2]==c && data[3]!=c) // ___bla or ***bla
+ if (size>4 && c!='~' && data[1]==c && data[2]==c && data[3]!=c) // ___bla or ***bla
{
if (data[3]==' ' || data[3]=='\n' ||
(ret = processEmphasis3(out, data+3, size-3, c)) == 0)
@@ -2513,6 +2515,7 @@ QCString processMarkdown(const QCString &fileName,const int lineNr,Entry *e,cons
// setup callback table for special characters
g_actions[(unsigned int)'_']=processEmphasis;
g_actions[(unsigned int)'*']=processEmphasis;
+ g_actions[(unsigned int)'~']=processEmphasis;
g_actions[(unsigned int)'`']=processCodeSpan;
g_actions[(unsigned int)'\\']=processSpecialCommand;
g_actions[(unsigned int)'@']=processSpecialCommand;