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 basic DOCTYPE support #25

Open
kristian opened this issue Nov 12, 2021 · 3 comments · May be fixed by #27
Open

Add basic DOCTYPE support #25

kristian opened this issue Nov 12, 2021 · 3 comments · May be fixed by #27

Comments

@kristian
Copy link

kristian commented Nov 12, 2021

Hey @matteodelabre, I am considering using your library for my XML minifier minify-xml, however parsing documents with a DOCTYPE resulting in a error is a blocker for me at this point in time. How about and how would you judge the effort adding basic DOCTYPE support, similar to processing instructions soon? Content parsing, similar to parseAttrs could be added later on and for my (many other purpose) getting an event with a content field would be enough for me and is in fact much better than just throwing an error for an otherwise valid document.

What do you think? Any chance of you adding this, or could you explain what was the complication to not having it added in the first place? Thanks!

@matteodelabre
Copy link
Owner

Hi kristian, from what I can tell, adding support for doctypes should not be that hard. I left it out initially since I didn’t need it, but of course I would be open to adding it. I can’t promise I’ll work on this soon unfortunately, as I have some pretty busy weeks coming.

@kristian
Copy link
Author

@matteodelabre sure, no worries! Let me see what I can do. If I provide you with a PR, you my find a minute to review it! :) As long as there is nothing that generally complicates it, adding DOCTYPE support shouldn't be that hard I hope. Let me see what I can do! 👍

@kristian kristian linked a pull request Nov 14, 2021 that will close this issue
@codalf
Copy link

codalf commented Apr 27, 2023

@matteodelabre: Is there a way, that I can support this issue? We'd also need DOCTYPE support...

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 a pull request may close this issue.

3 participants