-
Notifications
You must be signed in to change notification settings - Fork 15
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
DSK/DSC Tokens #283
DSK/DSC Tokens #283
Conversation
tokens.xml
Outdated
@@ -1,10 +1,10 @@ | |||
<?xml version="1.0" encoding="UTF-8"?> | |||
<?xml version='1.0' encoding='UTF-8'?> |
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.
what's this change for?
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 think it was my lxml lib version when i runned the script to grab the new tokens
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.
For whatever reason, lxml defaults to single quotes in the header (probably because Python makes no distinction between single and double quotes) and I can't figure out a way to change it. It messes around the order of attributes in <cockatrice_carddatabase> too.
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.
Next time I will revert it back to double quotes and the correct order of the attributes as well
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, I always have to make sure and check the diff before I submit the PR; a little annoying but preferable to making token entries manually. Thanks for doing this btw, hope the script wasn't too hard to use.
Apparently the single quotes are hardcoded in lxml so pretty much can't change that.
The attribute order is due to lxml storing the attributes in a Python dictionary (which is no longer inherently unordered, but it still isn't guaranteed to preserve order) when it reads the xml in, so there might be some way to manually reorder them when putting them back into xml format, but if so, I haven't found it yet.
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.
thank you for your help!
No description provided.