xo-indentlog: bugfix: escaped special chars behaving unexpectedly
This commit is contained in:
parent
292a410f1f
commit
86c6bbe806
2 changed files with 28 additions and 12 deletions
|
|
@ -74,11 +74,12 @@ namespace xo {
|
|||
break;
|
||||
case '\n':
|
||||
/* newline -> \n */
|
||||
os << "\\\n";
|
||||
/* somehow attempt to escape the newline triggers collapse */
|
||||
os << "\\n";
|
||||
break;
|
||||
case '\r':
|
||||
/* cr -> \r */
|
||||
os << "\\\r";
|
||||
os << "\\r";
|
||||
break;
|
||||
case '\\':
|
||||
/* \ => \\ (mind c++ requires we escape \) */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue