temple
temple copied to clipboard
Aliasing doesn't work for SVG elements
Describe the bug
Tag names for SVG elements can't be aliased. I saw in the code that aliasing is currently only implemented for HTML elements, but it should probably work for SVG and MathML too.
To Reproduce
I have the following code:
text = "foobar"
temple do
text
end
This will currently output <text></text> because text is the name of an SVG element.
Since temple prioritizes its own function names this is expected behavior.
I then add the following configuration:
config :temple,
aliases: [
text: :text_tag
]
Expected behavior
The code will output foobar.