diff --git a/examples/abnf2pegtl.cc b/examples/abnf2pegtl.cc index 7709fc68d..bb9ac7af2 100644 --- a/examples/abnf2pegtl.cc +++ b/examples/abnf2pegtl.cc @@ -263,7 +263,7 @@ namespace abnf2pegtl s += ", "; } s += '\''; - if( c == '\'' ) { + if( c == '\'' || c == '\\' ) { s += '\\'; } s += c;