File tree Expand file tree Collapse file tree 3 files changed +12
-2
lines changed Expand file tree Collapse file tree 3 files changed +12
-2
lines changed Original file line number Diff line number Diff line change
1
+ ## [ 0.4.30] ( https://github.com/ruby-debug/ruby-debug-ide/compare/v0.4.29...v0.4.30 )
2
+
3
+ * unescaping of empty line fixed
4
+ [ RUBY-16600] ( https://youtrack.jetbrains.com/issue/RUBY-16600 )
5
+
1
6
## [ 0.4.29] ( https://github.com/ruby-debug/ruby-debug-ide/compare/v0.4.28...v0.4.29 )
2
7
3
8
* Fixed problem with evaluating "%"
Original file line number Diff line number Diff line change @@ -66,8 +66,9 @@ def options
66
66
end
67
67
68
68
def unescape_incoming ( str )
69
- str . gsub ( /((?:^|[^\\ ])(?:\\ \\ )*)\\ n/ , "\\ 1\n " ) .
70
- gsub ( /\\ \\ / , '\\' )
69
+ str . gsub ( /((?:^|[^\\ ])(?:\\ \\ )*)((?:\\ n)+)/ ) do |_ |
70
+ $1 + "\n " * ( $2. size / 2 )
71
+ end . gsub ( /\\ \\ / , '\\' )
71
72
end
72
73
end
73
74
Original file line number Diff line number Diff line change @@ -28,6 +28,10 @@ def test_something
28
28
do_test ( '"\\\\\\n".size' , "\" \\ \n \" .size" )
29
29
end
30
30
31
+ def test_two_newlines
32
+ do_test ( 'hello\n\nworld' , "hello\n \n world" )
33
+ end
34
+
31
35
def do_test ( input , expected_result )
32
36
assert_equal ( expected_result , Debugger ::Command . unescape_incoming ( input ) )
33
37
end
You can’t perform that action at this time.
0 commit comments