diff options
author | Dimitri van Heesch <dimitri@stack.nl> | 2017-10-10 19:55:38 (GMT) |
---|---|---|
committer | Dimitri van Heesch <dimitri@stack.nl> | 2017-10-10 19:55:38 (GMT) |
commit | beaa386ca97341e66ad673660c808993240df637 (patch) | |
tree | 3f132b8093cb4a51527e89885eab6940e37e34cb /src/markdown.cpp | |
parent | 4b0b81a01ccade869f63188df4c3dafc06374674 (diff) | |
download | Doxygen-beaa386ca97341e66ad673660c808993240df637.zip Doxygen-beaa386ca97341e66ad673660c808993240df637.tar.gz Doxygen-beaa386ca97341e66ad673660c808993240df637.tar.bz2 |
Correction display of backtick in LaTeX
Diffstat (limited to 'src/markdown.cpp')
-rw-r--r-- | src/markdown.cpp | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/src/markdown.cpp b/src/markdown.cpp index 0d98410..42ec49d 100644 --- a/src/markdown.cpp +++ b/src/markdown.cpp @@ -956,6 +956,15 @@ static int processCodeSpan(GrowBuf &out, const char *data, int /*offset*/, int s i=0; nl++; } + else if (data[end]=='\'' && nb==1 && (end==size-1 || (end<size-1 && !isIdChar(end+1)))) + { // look for quoted strings like `some word', but skip strings like `it's cool` + QCString textFragment; + convertStringFragment(textFragment,data+nb,end-nb); + out.addStr("‘"); + out.addStr(textFragment); + out.addStr("’"); + return end+1; + } else { i=0; @@ -982,18 +991,6 @@ static int processCodeSpan(GrowBuf &out, const char *data, int /*offset*/, int s f_end--; } - if (nb==1) // check for closing ' followed by space within f_begin..f_end - { - i=f_begin; - while (i<f_end-1) - { - if (data[i]=='\'' && !isIdChar(i+1)) // reject `some word' and not `it's cool` - { - return 0; - } - i++; - } - } //printf("found code span '%s'\n",QCString(data+f_begin).left(f_end-f_begin).data()); /* real code span */ |