-
Notifications
You must be signed in to change notification settings - Fork 23
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
Migrate exml attributes from proplists to maps #74
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #74 +/- ##
==========================================
+ Coverage 73.87% 73.92% +0.04%
==========================================
Files 7 7
Lines 1183 1189 +6
Branches 169 169
==========================================
+ Hits 874 879 +5
- Misses 309 310 +1 ☔ View full report in Codecov by Sentry. |
0f20d46
to
7fc1219
Compare
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 to me! 👍 I really like the new utility functions added! I just have one minor comment
src/exml.erl
Outdated
xml_sort(#xmlstreamend{} = StreamEnd) -> | ||
StreamEnd; | ||
xml_sort({Key, Value}) -> | ||
{Key, Value}; | ||
xml_sort(Elements) when is_list(Elements) -> | ||
lists:sort([ xml_sort(E) || E <- Elements ]). | ||
|
||
%% @doc Return the given `t:element/0' without any `t:cdata/0' on its children. |
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.
I'm not sure this comment is entirely correct
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.
Oh, copy-paste from the function below, fixing in a sec!
7fc1219
to
7495721
Compare
We could be creating a new version that returns the attributes in a map instead of a proplist, and exports getters in line with
maps:with/2
andmaps:without/2
.