summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDimitri van Heesch <dimitri@stack.nl>2017-10-10 19:55:38 (GMT)
committerDimitri van Heesch <dimitri@stack.nl>2017-10-10 19:55:38 (GMT)
commitbeaa386ca97341e66ad673660c808993240df637 (patch)
tree3f132b8093cb4a51527e89885eab6940e37e34cb /src
parent4b0b81a01ccade869f63188df4c3dafc06374674 (diff)
downloadDoxygen-beaa386ca97341e66ad673660c808993240df637.zip
Doxygen-beaa386ca97341e66ad673660c808993240df637.tar.gz
Doxygen-beaa386ca97341e66ad673660c808993240df637.tar.bz2
Correction display of backtick in LaTeX
Diffstat (limited to 'src')
-rw-r--r--src/markdown.cpp21
-rw-r--r--src/util.cpp2
2 files changed, 11 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("&lsquo;");
+ out.addStr(textFragment);
+ out.addStr("&rsquo;");
+ 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 */
diff --git a/src/util.cpp b/src/util.cpp
index 1b169cb..d3d7dfe 100644
--- a/src/util.cpp
+++ b/src/util.cpp
@@ -6733,6 +6733,8 @@ void filterLatexString(FTextStream &t,const char *str,
break;
case '"': t << "\\char`\\\"{}";
break;
+ case '`': t << "\\`{}";
+ break;
case '\'': t << "\\textquotesingle{}";
break;
case ' ': if (keepSpaces) { if (insideTabbing) t << "\\>"; else t << '~'; } else t << ' ';