diff --git a/package-lock.json b/package-lock.json index 1d47fa4..2e2cfc8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@contentstack/json-rte-serializer", - "version": "2.0.5", + "version": "2.0.6", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@contentstack/json-rte-serializer", - "version": "2.0.5", + "version": "2.0.6", "license": "MIT", "dependencies": { "array-flat-polyfill": "^1.0.1", diff --git a/src/toRedactor.tsx b/src/toRedactor.tsx index bde7045..96c5135 100644 --- a/src/toRedactor.tsx +++ b/src/toRedactor.tsx @@ -229,7 +229,7 @@ export const toRedactor = (jsonValue: any,options?:IJsonToHtmlOptions) : string text = `${text}` } } - if (jsonValue.text.includes('\n')) { + if (jsonValue.text.includes('\n') && !jsonValue['break']) { text = text.replace(/\n/g, '
') } Object.entries(jsonValue).forEach(([key, value]) => {