Skip to content
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

Add SVG elements #313

Merged
merged 1 commit into from
Jul 30, 2024
Merged

Add SVG elements #313

merged 1 commit into from
Jul 30, 2024

Conversation

kensanata
Copy link
Contributor

SVG is now part of HTML 5. Add all the SVG elements from https://developer.mozilla.org/en-US/docs/Web/SVG/Element with the exception of "a", "script" and "style" elements.

SVG is now part of HTML 5. Add all the SVG elements from
https://developer.mozilla.org/en-US/docs/Web/SVG/Element with the
exception of "a", "script" and "style" elements.
@kjk kjk merged commit 880ee61 into gomarkdown:master Jul 30, 2024
1 check passed
@kjk
Copy link
Contributor

kjk commented Jul 30, 2024

Thanks!

@kensanata
Copy link
Contributor Author

Argh! I just looked at it again and I think I misunderstood. In blockTags we only need the elements that can be used without special escaping, right? Perhaps this means that the only actual element that needs to be added is svg, not all of them.

@kensanata
Copy link
Contributor Author

Then again, perhaps this means that we can fix #303 by simply adding the math element. I'll prepare another merge request that does that.

@kjk
Copy link
Contributor

kjk commented Jul 30, 2024

My bad, I didn't really look and I don't know those details off the top of my head.

Hence, I reverted the commit.

My suggestion: write a failing test case that shows that behavior you expect doesn't happen then make the change to fix it.

The only way to know for sure what difference the change will make.

@kensanata
Copy link
Contributor Author

Yeah. Will do. For my needs it "worked" … but it also added a lot of unnecessary elements. I think the SVG
section of the HTML 5 specification
says that svg is always the top level element, just like math for MathML. But adding tests is always better.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants