Skip to content

Commit 6f02073

Browse files
committed
Fixes: also allow ; and space as attribute separator
1 parent e665f2e commit 6f02073

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

src/configimpl.l

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2112,20 +2112,16 @@ void Config::updateObsolete()
21122112
" Otherwise you run the risk that the wrong font is being used for dot generated graphs.\n");
21132113

21142114
QCString& commonAttrStr = *dynamic_cast<ConfigString*>(ConfigImpl::instance()->get("DOT_COMMON_ATTR"))->valueRef();
2115-
printf("commonAttrStr=%s before\n",qPrint(commonAttrStr));
21162115
DotAttributes commonAttr(commonAttrStr);
21172116
updateAttribute(commonAttr, "fontname", fontname);
21182117
updateAttribute(commonAttr, "fontsize", fontsize);
21192118
commonAttrStr = commonAttr.str();
2120-
printf("commonAttrStr=%s after\n",qPrint(commonAttrStr));
21212119

21222120
QCString& edgeAttrStr = *dynamic_cast<ConfigString*>(ConfigImpl::instance()->get("DOT_EDGE_ATTR"))->valueRef();
2123-
printf("edgeAttrStr=%s before\n",qPrint(edgeAttrStr));
21242121
DotAttributes edgeAttr(edgeAttrStr);
21252122
updateAttribute(edgeAttr, "labelfontname", fontname);
21262123
updateAttribute(edgeAttr, "labelfontsize", fontsize);
21272124
edgeAttrStr = edgeAttr.str();
2128-
printf("edgeAttrStr=%s after\n",qPrint(edgeAttrStr));
21292125
}
21302126

21312127
void Config::writeTemplate(TextStream &t,bool shortList,bool update)

src/dotattributes.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,9 @@ class DotAttributes
5353
while (pos<len && (s[pos]!='"' || (s[pos]=='"' && pc=='\\'))) pc=s[pos++];
5454
if (pos<len) pos++; // skip over end quote
5555
}
56-
else // unquotes value, search for attribute separator
56+
else // unquoted value, search for attribute separator (space,comma, or semicolon)
5757
{
58-
while (pos<len && s[pos]!=',') pos++;
58+
while (pos<len && s[pos]!=',' && s[pos]!=';' && !qisspace(s[pos])) pos++;
5959
}
6060
// pos is now the position after the value, so replace the part between [start..pos) with the new value
6161
m_input=m_input.left(startPos)+value.quoted()+m_input.mid(pos);

0 commit comments

Comments
 (0)