diff --git a/src/VJsonParse.res b/src/VJsonParse.res index 25bacc7..affcc63 100644 --- a/src/VJsonParse.res +++ b/src/VJsonParse.res @@ -26,7 +26,7 @@ let parseVJsonWithVariable = parseVariableString => { \"<|>"(str("true") |> map(_ => true), str("false") |> map(_ => false)) |> lexeme let escapedQuoteRegex = %re(`/\\\\"/gm`) - let nonEsacapedQuoteRegex = %re(`/(? { regex(inQuotesRegex) |> map(match => { match - ->Js.String2.replaceByRe(nonEsacapedQuoteRegex, ``) + ->Js.String2.replaceByRe(nonEscapedQuoteRegex, `$1`) // First group of the regex is characters before the quote that should be kept ->Js.String2.replaceByRe(escapedQuoteRegex, `"`) }) |> lexeme