Skip to content

Commit 031d40c

Browse files
committed
fix #278
by simply inserting space
1 parent 526275e commit 031d40c

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/attributes.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1434,6 +1434,13 @@ namespace attributes {
14341434
// check for name
14351435
std::string name;
14361436
if (pos != std::string::npos) {
1437+
// insert whitespace if variables are joint with '&'
1438+
std::string::size_type ref_pos = arg.substr(pos).find_last_of("&");
1439+
if (ref_pos != std::string::npos) {
1440+
pos += ref_pos + 1;
1441+
arg.insert(pos, " ");
1442+
}
1443+
14371444
name = arg.substr(pos);
14381445
trimWhitespace(&name);
14391446
}

0 commit comments

Comments
 (0)