-
Notifications
You must be signed in to change notification settings - Fork 75
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
Handle Tree.toXML to return proper XML string #805
Conversation
Generate TreeChangeType.Style events by filtering out only the affected properties.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #805 +/- ##
==========================================
+ Coverage 80.67% 80.74% +0.06%
==========================================
Files 59 59
Lines 4476 4481 +5
Branches 908 908
==========================================
+ Hits 3611 3618 +7
Misses 601 601
+ Partials 264 262 -2 ☔ View full report in Codecov by Sentry. |
197519b
to
7a614db
Compare
7dba6db
to
f765d1c
Compare
Generate TreeChangeType.Style events by filtering out only the affected properties.
7a614db
to
0a12a5e
Compare
…team/yorkie-js-sdk with conflicts.
…ndle-concurrent-style
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In 'concurrently-edit-style-test', the result of first test case was as follows, so I handled an exception for the case where it is not a nested object, that is, 'string'. I am wondering if there is a better way.
const initialXML = `<r><p color="red">a</p><p color="red">b</p><p color="red">c</p></r>`; |
Expected :<r><p color="red">a</p><p color="red">b</p><p color="red">c</p></r>
Actual :<r><p color="\"red\"">a</p><p color="\"red\"">b</p><p color="\"red\"">c</p></r>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your contribution.
What this PR does / why we need it?
When attempting to directly convert the object resulting from
JSON.parse()
into a string during the toXML() process for RHT, issues may arise. The conversion of the object to a string may result in an output such as[object Object]
, which needs to be addressed. This PR handles the conversion of objects to strings to prevent unexpected results.Any background context you want to provide?
In the toXML() process for RHT, the value obtained from
JSON.parse()
was directly converted to a string. This conversion led to undesired outcomes when the object contained in the value was transformed into the string[object Object]
. To mitigate this issue, adjustments were made to properly handle the conversion of objects to strings.What are the relevant tickets?
Fixes #
Checklist