mirror of https://github.com/odrling/Aegisub
Actually trim whitespace when combining lines
regex_replace does not mutate the string in place.
This commit is contained in:
parent
e315ceb236
commit
8fade74026
|
@ -863,8 +863,8 @@ std::string trim_text(std::string text) {
|
|||
boost::regex start("^( |\t|\\\\[nNh])+");
|
||||
boost::regex end("( |\t|\\\\[nNh])+$");
|
||||
|
||||
regex_replace(text, start, "", boost::format_first_only);
|
||||
regex_replace(text, end, "", boost::format_first_only);
|
||||
text = regex_replace(text, start, "", boost::format_first_only);
|
||||
text = regex_replace(text, end, "", boost::format_first_only);
|
||||
return text;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue