Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: added condiition to check for text nodes with empty white space #29

Merged
merged 3 commits into from
Nov 6, 2023

Conversation

Jayesh2812
Copy link
Contributor

@Jayesh2812 Jayesh2812 commented Nov 3, 2023

Issue:
Empty whitespace between nodes (because of formatting) was converted to text nodes having only whitespace, since these text nodes were between block nodes they were wrapped in fragment node, causing extra fragment node to be inserted in JSON.
Solution:
Added condition to check for text nodes with empty white space using trim and length which are present inside table, tbody, thead, tr

@Jayesh2812 Jayesh2812 requested a review from a team as a code owner November 3, 2023 06:22
@@ -160,8 +160,10 @@ const traverseChildAndWarpChild = (children: Array<Object>) => {

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

started review

Copy link

@KANE-99 KANE-99 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Jayesh2812 Jayesh2812 merged commit fda7929 into development Nov 6, 2023
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants