-
Notifications
You must be signed in to change notification settings - Fork 39
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
Spaces not preserved in text #94
Comments
So are you implying that you think |
I am not advocating for a specific solution, but as far I know setting xml:space="preserve" by default would be fine. As a user, all that I would like is some way to enable xml:space="preserve" without using renderSVG' so that it's easy to switch backends. |
Ah, thanks for the clarification, that does make sense. I hadn't considered it from the point of view of switching backends. I'm guessing (but don't actually know for sure) that most, if not all, other backends essentially do something like xml:space="preserve"? |
By default, SVG does not preserve spaces in text. This is explained in the SVG spec:
I am working on a visual representation of Haskell rendered using diagrams (Glance), so of course I want to preserve spaces for string literals and comments.
As a workaround, I made a customized version of renderSVG that adds the attribute
bindAttr XmlSpace_ (pack "preserve")
The text was updated successfully, but these errors were encountered: