From 426fdafc5359b9a5843d00523255fdcd857e8633 Mon Sep 17 00:00:00 2001 From: "Chhandak.Barua" Date: Tue, 7 Mar 2023 20:48:07 +0530 Subject: [PATCH] To identify coorect end of the regex --- tests/Resources/jshrink/input/regex_end_string.js | 3 +++ tests/Resources/jshrink/output/regex_end_string.js | 1 + 2 files changed, 4 insertions(+) create mode 100644 tests/Resources/jshrink/input/regex_end_string.js create mode 100644 tests/Resources/jshrink/output/regex_end_string.js diff --git a/tests/Resources/jshrink/input/regex_end_string.js b/tests/Resources/jshrink/input/regex_end_string.js new file mode 100644 index 0000000..79164ff --- /dev/null +++ b/tests/Resources/jshrink/input/regex_end_string.js @@ -0,0 +1,3 @@ +escapeCssMeta: function( string ) { + return (string || '').replace( /([\\!"#$%&'()*+,./:;<=>?@\[\]^`{|}~])/g, "\\$1" ); +}, \ No newline at end of file diff --git a/tests/Resources/jshrink/output/regex_end_string.js b/tests/Resources/jshrink/output/regex_end_string.js new file mode 100644 index 0000000..1311d14 --- /dev/null +++ b/tests/Resources/jshrink/output/regex_end_string.js @@ -0,0 +1 @@ +escapeCssMeta:function(string){return(string||'').replace(/([\\!"#$%&'()*+,./:;<=>?@\[\]^`{|}~])/g,"\\$1");}, \ No newline at end of file