RunJS icon indicating copy to clipboard operation
RunJS copied to clipboard

Line Breaks Not Escaped in RegExp Output

Open oculus42 opened this issue 3 years ago • 1 comments

Escaped line breaks in regular expressions are not escaped on output. A super minor issue, but something I ran across.

Input:

new RegExp('abc\ndef');
/ghi\njkl/;

Output:

/abc
def/
/ghi
jkl/

Node from the terminal and browser consoles return the regex on one line as expected.

macOS 12.3.1 RunJS v2.3.1

oculus42 avatar May 16 '22 15:05 oculus42

Thanks, I'll look into it.

lukehaas avatar May 17 '22 09:05 lukehaas