-
Notifications
You must be signed in to change notification settings - Fork 266
Implement serializing CDATA #904
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
base: master
Are you sure you want to change the base?
Conversation
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.
Looks good, but need to check how lists will be serialized and would we able to deserialize them back.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #904 +/- ##
==========================================
+ Coverage 55.52% 58.70% +3.17%
==========================================
Files 42 42
Lines 15511 15242 -269
==========================================
+ Hits 8613 8948 +335
+ Misses 6898 6294 -604
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Co-authored-by: Mingun <Alexander_Sergey@mail.ru>
src/se/simple_type.rs
Outdated
serialize_cdata_as!(seq_basic: vec!["foo", "bar", "baz"] => "<![CDATA[foo]]> <![CDATA[bar]]> <![CDATA[baz]]>"); | ||
serialize_cdata_as!(seq_with_markup_chars: vec!["<tag>", "&entity", "\"quoted\"", "with space"] => "<![CDATA[<tag>]]> <![CDATA[&entity]]> <![CDATA[\"quoted\"]]> <![CDATA[with space]]>"); | ||
serialize_cdata_as!(seq_with_cdata_end_split: vec!["foo]]>bar", "test"] => "<![CDATA[foo]]]]><![CDATA[>bar]]> <![CDATA[test]]>"); | ||
serialize_cdata_as!(tuple_cdata: ("first", 42, "third") => "<![CDATA[first]]> <![CDATA[42]]> <![CDATA[third]]>"); |
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.
It would be better, if this serialized as one CDATA section. Probably, that is possible?
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.
yeah agreed, need to figure out exactly how to do that nicely with serde
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.
alright changed it so it gets serialized to one CDATA section
one thing i'm not clear on is if there are spaces inside the items, should the spaces get escaped even when it's wrapped with a CDATA
Closes: #353