diff --git a/CHANGELOG.md b/CHANGELOG.md index 8cf15aa..073f914 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,11 @@ # Changelog -## [1.3.4](https://github.com/contentstack/contentstack-utils-javascript/tree/v1.3.5) (2024-05-31) +## [1.3.6](https://github.com/contentstack/contentstack-utils-javascript/tree/v1.3.6) (2024-05-31) + - Fix: handle case of td or th nodes with attr void:true + +## [1.3.5](https://github.com/contentstack/contentstack-utils-javascript/tree/v1.3.5) (2024-05-31) - Feat: updateAssetURLForGQL added + - Fix: add rowspan and colspan attribute to td and th nodes ## [1.3.4](https://github.com/contentstack/contentstack-utils-javascript/tree/v1.3.4) (2024-05-13) - Fixes for vulnerability issues related to regular expression and options diff --git a/__test__/default-node-options.test.ts b/__test__/default-node-options.test.ts index 618be74..986c1d2 100644 --- a/__test__/default-node-options.test.ts +++ b/__test__/default-node-options.test.ts @@ -71,6 +71,18 @@ const tableHeadNode: Node = { children: [] } +const tableDataNodeWithVoid: Node = { + type: NodeType.TABLE_DATA, + attrs: { void: true }, + children: [] +} + +const tableHeadNodeWithVoid: Node = { + type: NodeType.TABLE_HEAD, + attrs: { void: true }, + children: [] +} + describe('Default node render options', () => { it('Should return document string', done => { const renderString = (defaultNodeOption[NodeType.DOCUMENT] as RenderNode)(node, next) @@ -160,6 +172,12 @@ describe('Default node render options', () => { renderString = (defaultNodeOption[NodeType.TABLE_DATA] as RenderNode)(tableDataNode, next) expect(renderString).toEqual('