summaryrefslogtreecommitdiffstats
path: root/src/markdown.cpp
diff options
context:
space:
mode:
authorDimitri van Heesch <dimitri@stack.nl>2014-04-13 09:33:52 (GMT)
committerDimitri van Heesch <dimitri@stack.nl>2014-04-13 09:33:52 (GMT)
commit385b87e08c23b1392d0e6d6fbdb6ef463fa28477 (patch)
tree33f9e024a69a755aaf7d3c2cec778648f6f4009a /src/markdown.cpp
parent4ccfb9efa8382de50dfc5b176cb147fd1b05870c (diff)
downloadDoxygen-385b87e08c23b1392d0e6d6fbdb6ef463fa28477.zip
Doxygen-385b87e08c23b1392d0e6d6fbdb6ef463fa28477.tar.gz
Doxygen-385b87e08c23b1392d0e6d6fbdb6ef463fa28477.tar.bz2
Added support for \-- and \--- to prevent interpretation as ndash and mdash
Diffstat (limited to 'src/markdown.cpp')
-rw-r--r--src/markdown.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/markdown.cpp b/src/markdown.cpp
index 593c45e..291e1dc 100644
--- a/src/markdown.cpp
+++ b/src/markdown.cpp
@@ -1004,6 +1004,16 @@ static int processSpecialCommand(GrowBuf &out, const char *data, int offset, int
if (c=='[' || c==']' || c=='*' || c=='+' || c=='-' ||
c=='!' || c=='(' || c==')' || c=='.' || c=='`' || c=='_')
{
+ if (c=='-' && size>3 && data[2]=='-' && data[3]=='-') // \---
+ {
+ out.addStr(&data[1],3);
+ return 4;
+ }
+ else if (c=='-' && size>2 && data[2]=='-') // \--
+ {
+ out.addStr(&data[1],2);
+ return 3;
+ }
out.addStr(&data[1],1);
return 2;
}