-
Notifications
You must be signed in to change notification settings - Fork 44
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
Issue with self closing element when the generated svg is embedded in html #16
Comments
I believe the logic can be seen here. There is no way to configure this at this point. |
For future reference, here's the correct permalink where the self-closing formatting can be found: Line 68 in a391bb2
|
Thank you for the correction. Right, one would have to distinguish two cases there: permitted to close without a closing tag or not, depending on the element. To this end, perhaps |
Can anybody please provide a link to the spec that shows that certain tags are not permitted to be self-closing? If the current behavior is in accordance with the specification, nothing has to be changed. |
I leave this one as a reference and close this issue: https://stackoverflow.com/questions/24299969/closing-svg-tags-explicit-or-self-closing Please shout if there is a contradicting and more reliable reference. |
When the generated SVG is put into an HTML document and served into a browser, many browsers will autocorrect the markup. They will find tags that are not permitted to use />, and will automatically insert a closing tag.
E.g. becomes when loaded in an HTML page in Google Chrome.
Is it possible to disable the short version and force a verbose output ?
Edit: I'm using the to_string() method of Document to convert into string
The text was updated successfully, but these errors were encountered: