File tree Expand file tree Collapse file tree 2 files changed +3
-4
lines changed Expand file tree Collapse file tree 2 files changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -105,8 +105,8 @@ void JsonWriter::flush() {
105
105
str.push (reFilter);
106
106
107
107
// create a regex-based filter to replace \/ (produced by newer boost) by /
108
- const boost::regex reSlash (" ([^\\\\ ]*) \\\\ / " );
109
- boost::iostreams::basic_regex_filter<char > reFilterSlash (reSlash, " \\ 1/ " );
108
+ const boost::regex reSlash (" ([^\\\\ ]*(?: \\\\\\\\ )*)(?: \\\\ (/))? " );
109
+ boost::iostreams::basic_regex_filter<char > reFilterSlash (reSlash, " \\ 1\\ 2 " );
110
110
str.push (reFilterSlash);
111
111
112
112
str.push (d->str );
Original file line number Diff line number Diff line change @@ -23,9 +23,8 @@ set(testdir "${csdiff_SOURCE_DIR}/tests")
23
23
set (csjson "${csgrep} --mode=json" )
24
24
set (diffcmd "diff -up" )
25
25
26
- # new versions of Boost tend to escape '/' in JSON strings, no idea why
26
+ # unify the JSON output generated by different version of Boost
27
27
set (jsfilter "sed" )
28
- set (jsfilter "${jsfilter} -e 's|\\\\\\\\\\\\\\\\ /|/|g'" )
29
28
set (jsfilter "${jsfilter} -e ':a;N;$!ba;s|:\\\\\\\\ n *\\\\\\\\ [|: [|g'" )
30
29
31
30
macro (add_test_wrap test_name cmd )
You can’t perform that action at this time.
0 commit comments