Skip to content

Fix #278 by automatically inserting whitespace #400

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 27, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions src/attributes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1434,6 +1434,13 @@ namespace attributes {
// check for name
std::string name;
if (pos != std::string::npos) {
// insert whitespace if variables are joint with '&'
std::string::size_type ref_pos = arg.substr(pos).find_last_of("&");
if (ref_pos != std::string::npos) {
pos += ref_pos + 1;
arg.insert(pos, " ");
}

name = arg.substr(pos);
trimWhitespace(&name);
}
Expand Down