diff --git a/package.json b/package.json index 2314fe5..46f84fd 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@contentstack/json-rte-serializer", - "version": "3.0.2", + "version": "3.0.3", "description": "This Package converts Html Document to Json and vice-versa.", "main": "lib/index.js", "module": "lib/index.mjs", diff --git a/src/toRedactor.tsx b/src/toRedactor.tsx index 4d39395..02ab067 100644 --- a/src/toRedactor.tsx +++ b/src/toRedactor.tsx @@ -60,7 +60,7 @@ const ELEMENT_TYPES: IJsonToHtmlElementTags = { return `
${child}` + return `
${child.replace(/` }, li: (attrs: any, child: any) => { return `
/g, '\n')}
Hi
Hello
`); }); +test("should convert codeblock to proper html, where \n should not be replaced withHi\nHello`); +})