Skip to content

Commit 28b4132

Browse files
committed
issue doxygen#11722 Doxygen GUI frontend cannot process value with space
1 parent c829073 commit 28b4132

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

addon/doxywizard/config_doxyw.l

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,10 @@ static void processList()
236236
{
237237
elemStr+='"';
238238
}
239+
else if (insideQuote && i<l-2 && s.at(i+1)=='\\' && s.at(i+2)=='"') // escaped "\" at the end of a quoted section
240+
{
241+
elemStr+="\\";
242+
}
239243
else // keep other escaped characters in escaped form
240244
{
241245
elemStr+=c;
@@ -803,6 +807,7 @@ void writeStringValue(QTextStream &t,TextCodecAdapter *codec,const QString &s,bo
803807
c==QChar::fromLatin1(',') ||
804808
c==QChar::fromLatin1('\n') ||
805809
c==QChar::fromLatin1('\t') ||
810+
c==QChar::fromLatin1('\\') ||
806811
c==QChar::fromLatin1('"'));
807812
}
808813
p=s.data();
@@ -823,6 +828,7 @@ void writeStringValue(QTextStream &t,TextCodecAdapter *codec,const QString &s,bo
823828
if (*p ==QChar::fromLatin1(' ') &&
824829
*(p+1)==QChar::fromLatin1('\0')) break; // skip inserted space at the end
825830
if (*p ==QChar::fromLatin1('"')) t << "\\"; // escape quotes
831+
if (*p ==QChar::fromLatin1('\\') && (p+1)->isNull()) t << "\\"; // escape last "\", for e.g c:\temp\ where "\" is part of the path
826832
if (convert)
827833
{
828834
if (*p ==QChar::fromLatin1('<')) t << "&lt;";

src/configimpl.l

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -861,6 +861,10 @@ static void processList()
861861
{
862862
elemStr+='"';
863863
}
864+
else if (insideQuote && i<l-2 && s.at(i+1)=='\\' && s.at(i+2)=='"') // escaped "\" at the end of a quoted section
865+
{
866+
elemStr+="\\";
867+
}
864868
else // keep other escaped characters in escaped form
865869
{
866870
elemStr+=c;

0 commit comments

Comments
 (0)