mirror of
https://github.com/jbeder/yaml-cpp.git
synced 2026-02-19 22:56:28 +00:00
fix: handle escaped underscore \_ correctly
This commit is contained in:
committed by
Jesse Beder
parent
3e53605a31
commit
44d54544b1
@@ -117,11 +117,11 @@ std::string Escape(Stream& in) {
|
|||||||
case 'N':
|
case 'N':
|
||||||
return "\x85";
|
return "\x85";
|
||||||
case '_':
|
case '_':
|
||||||
return "\xA0";
|
return "\xC2\xA0"; // NBSP (U+00A0)
|
||||||
case 'L':
|
case 'L':
|
||||||
return "\xE2\x80\xA8"; // LS (#x2028)
|
return "\xE2\x80\xA8"; // LS (U+2028)
|
||||||
case 'P':
|
case 'P':
|
||||||
return "\xE2\x80\xA9"; // PS (#x2029)
|
return "\xE2\x80\xA9"; // PS (U+2029)
|
||||||
case 'x':
|
case 'x':
|
||||||
return Escape(in, 2);
|
return Escape(in, 2);
|
||||||
case 'u':
|
case 'u':
|
||||||
|
|||||||
Reference in New Issue
Block a user