@@ -248,7 +248,17 @@ static QCString escapeSpecialChars(const QCString &s)
248248 switch (c)
249249 {
250250 case ' "' :
251- if (pc!=' \\ ' ) { insideQuote=!insideQuote; }
251+ if (pc!=' \\ ' )
252+ {
253+ if (Config_getBool (MARKDOWN_STRICT))
254+ {
255+ result+=' \\ ' ;
256+ }
257+ else // For Doxygen's markup style a quoted text is left untouched
258+ {
259+ insideQuote=!insideQuote;
260+ }
261+ }
252262 result+=c;
253263 break ;
254264 case ' <' :
@@ -1641,6 +1651,7 @@ int Markdown::Private::processCodeSpan(std::string_view data,size_t offset)
16411651 /* finding the next delimiter with the same amount of backticks */
16421652 size_t i = 0 ;
16431653 char pc = ' `' ;
1654+ bool markdownStrict = Config_getBool (MARKDOWN_STRICT);
16441655 for (end=nb; end<size; end++)
16451656 {
16461657 // AUTO_TRACE_ADD("c={} nb={} i={} size={}",data[end],nb,i,size);
@@ -1688,15 +1699,15 @@ int Markdown::Private::processCodeSpan(std::string_view data,size_t offset)
16881699 pc = ' \n ' ;
16891700 i = 0 ;
16901701 }
1691- else if (data[end]==' \' ' && nb==1 && (end+1 ==size || (end+1 <size && data[end+1 ]!=' \' ' && !isIdChar (data[end+1 ]))))
1702+ else if (!markdownStrict && data[end]==' \' ' && nb==1 && (end+1 ==size || (end+1 <size && data[end+1 ]!=' \' ' && !isIdChar (data[end+1 ]))))
16921703 { // look for quoted strings like 'some word', but skip strings like `it's cool`
16931704 out+=" ‘" ;
16941705 out+=data.substr (nb,end-nb);
16951706 out+=" ’" ;
16961707 AUTO_TRACE_EXIT (" quoted end={}" ,end+1 );
16971708 return static_cast <int >(end+1 );
16981709 }
1699- else if (data[end]==' \' ' && nb==2 && end+1 <size && data[end+1 ]==' \' ' )
1710+ else if (!markdownStrict && data[end]==' \' ' && nb==2 && end+1 <size && data[end+1 ]==' \' ' )
17001711 { // look for '' to match a ``
17011712 out+=" “" ;
17021713 out+=data.substr (nb,end-nb);
0 commit comments