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

Typeset removing closing slash on void (singleton) elements #71

Open
rootwork opened this issue Jun 15, 2021 · 4 comments
Open

Typeset removing closing slash on void (singleton) elements #71

rootwork opened this issue Jun 15, 2021 · 4 comments
Assignees
Labels

Comments

@rootwork
Copy link

Void elements, or singletons, like img, hr, br and others contain a closing forward slash in (X)HTML validation, e.g. <img src="foo.jpg" />.

When Typeset processes content with HTML, it is removing those closing slashes, e.g. rendering the above as <img src="foo.jpg">.

Closing slashes are of course optional, but:

a) I don't think Typeset should be messing with tag syntax in the first place.
b) In HTML emails, using closing slashes is recommended for cross-email compatibility in all their crappy rendering engines.
c) In my case, I'm using MJML, which uses void/singleton elements for things like mj-image -- and in that case a tag without a closing slash isn't valid.

My specific use might be an edge case, but I'm sure I'm not the only one formatting HTML emails.

Can Typeset avoid changing HTML tags?

@rootwork
Copy link
Author

Oh, also -- this doesn't seem to happen with only "optically align letters" turned on. But with small caps, hanging punctuation, etc. it does change the tags.

@davidmerfield
Copy link
Owner

This is definitely a bug – I don't have an immediate hunch as to the source of the issue but I will fix this!

@rootwork
Copy link
Author

Thank you! I really appreciate it.

@danielhaim1
Copy link
Collaborator

@rootwork v0.3.4 will fix this issue.

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

No branches or pull requests

3 participants