@linthtml/html-parser
Advanced tools
Comparing version 0.10.0-beta.6 to 0.10.0-beta.7
{ | ||
"name": "@linthtml/html-parser", | ||
"version": "0.10.0-beta.6", | ||
"version": "0.10.0-beta.7", | ||
"description": "LintHTML HTML parser", | ||
@@ -31,3 +31,3 @@ "author": "BenjaminJ <kamikillerto@gmail.com>", | ||
"dependencies": { | ||
"@linthtml/dom-utils": "^0.10.0-beta.6", | ||
"@linthtml/dom-utils": "^0.10.0-beta.7", | ||
"domhandler": "^4.2.2", | ||
@@ -39,4 +39,4 @@ "htmlparser2": "^7.1.2" | ||
}, | ||
"gitHead": "1500ccd38457cbf97dee37a5d5cbc245be9dc620", | ||
"gitHead": "7d84c2b72609c835e825ce2678adcbf6c623c40d", | ||
"module": "./src/index.js" | ||
} |
import { DomHandler } from "htmlparser2"; | ||
import { Document, NodeAttribute, Node } from "@linthtml/dom-utils"; | ||
import type { Node } from "@linthtml/dom-utils"; | ||
import { Document, NodeAttribute } from "@linthtml/dom-utils"; | ||
export default class Handler extends DomHandler { | ||
@@ -4,0 +5,0 @@ /** The elements of the DOM */ |
@@ -0,3 +1,7 @@ | ||
/* eslint-disable @typescript-eslint/no-unsafe-call */ | ||
/* eslint-disable @typescript-eslint/no-unsafe-return */ | ||
/* eslint-disable @typescript-eslint/no-unsafe-argument */ | ||
/* eslint-disable @typescript-eslint/no-unsafe-member-access */ | ||
/* eslint-disable @typescript-eslint/no-unsafe-assignment */ | ||
import { DomHandler, ElementType } from "htmlparser2"; | ||
// TODO: remove | ||
import { is_void_node, CharValue, Document, Element, NodeAttribute, Position, Range | ||
@@ -22,3 +26,3 @@ // TODO find a way to have /dom_elements | ||
get _parser() { | ||
// @ts-ignore | ||
// @ts-expect-error Trick to avoid having to use ts-expect-error in many places | ||
return this.parser; | ||
@@ -73,3 +77,3 @@ } | ||
onopentag(name /* , attribs: { [key: string]: string } */) { | ||
// @ts-ignore | ||
// @ts-expect-error This options is marked as private but still usage here | ||
const type = this.options.xmlMode ? ElementType.Tag : undefined; | ||
@@ -76,0 +80,0 @@ const node = new Element(name, this.attributes, undefined, type); |
{ | ||
"name": "@linthtml/html-parser", | ||
"version": "0.10.0-beta.6", | ||
"version": "0.10.0-beta.7", | ||
"description": "LintHTML HTML parser", | ||
@@ -31,3 +31,3 @@ "author": "BenjaminJ <kamikillerto@gmail.com>", | ||
"dependencies": { | ||
"@linthtml/dom-utils": "^0.10.0-beta.6", | ||
"@linthtml/dom-utils": "^0.10.0-beta.7", | ||
"domhandler": "^4.2.2", | ||
@@ -39,3 +39,3 @@ "htmlparser2": "^7.1.2" | ||
}, | ||
"gitHead": "1500ccd38457cbf97dee37a5d5cbc245be9dc620" | ||
"gitHead": "7d84c2b72609c835e825ce2678adcbf6c623c40d" | ||
} |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
12865
234