Skip to content

Remove ancient nodes #7

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

Closed
wooorm opened this issue Jul 4, 2016 · 0 comments
Closed

Remove ancient nodes #7

wooorm opened this issue Jul 4, 2016 · 0 comments
Labels
🗄 area/interface This affects the public interface 💪 phase/solved Post is done 🧑 semver/major This is a change 🦋 type/enhancement This is great to have

Comments

@wooorm
Copy link
Member

wooorm commented Jul 4, 2016

htmlparser2 supports a weird mix of XML and HTML, such as processing instructions and directives. HTML, the standard, does not. For example, processingInstructions, directives (other than doctypes), and cdata are not supported in HTML.

There’s a new branch up for rehype which uses parse5, a standard compliant HTML parser. It doesn’t support processing instructions or cdata. I’m going to remove support for those. Plus, I’m replacing the directive with the one allowed directive: a doctype node.

As doctypes have a name, public identifier, and system identifier, maybe those should be supported on the interface?

interface Doctype <: Node {
  type: "doctype";
  name: string?;
  public: string?;
  system: string?;
}

Where:

<!DOCTYPE html>

Yields:

{
  "type": "doctype",
  "name": "html",
  "public": null,
  "system": null
}
@wooorm wooorm added 🦋 type/enhancement This is great to have 🧑 semver/major This is a change 🙉 open/needs-info This needs some more info labels Jul 4, 2016
@wooorm wooorm changed the title Remove ancient elements Remove ancient nodes Jul 4, 2016
@wooorm wooorm closed this as completed in 2ba54c0 Jul 25, 2016
@wooorm wooorm added ⛵️ status/released 🗄 area/interface This affects the public interface and removed 🙉 open/needs-info This needs some more info labels Aug 12, 2019
@wooorm wooorm added the 💪 phase/solved Post is done label Apr 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🗄 area/interface This affects the public interface 💪 phase/solved Post is done 🧑 semver/major This is a change 🦋 type/enhancement This is great to have
Development

No branches or pull requests

1 participant