From bc745f1fd947e4a8df310317e759708676b7d0ba Mon Sep 17 00:00:00 2001 From: yusukehirao Date: Mon, 9 Nov 2020 16:27:52 +0900 Subject: [PATCH 1/8] Update modules --- packages/@markuplint/html-spec/gen/html-elements.ts | 12 ++++++------ packages/@markuplint/html-spec/package.json | 8 ++++---- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/packages/@markuplint/html-spec/gen/html-elements.ts b/packages/@markuplint/html-spec/gen/html-elements.ts index 1e84d8424..ac6e5f24f 100644 --- a/packages/@markuplint/html-spec/gen/html-elements.ts +++ b/packages/@markuplint/html-spec/gen/html-elements.ts @@ -104,7 +104,7 @@ export async function getHTMLElement(link: string) { return spec; } -export function getAttributes($: CheerioStatic, heading: string, tagName: string): Attribute[] { +export function getAttributes($: cheerio.Root, heading: string, tagName: string): Attribute[] { const $heading = $(heading); const $outline = getThisOutline($, $heading); const { attributes } = getAttribute(tagName); @@ -162,7 +162,7 @@ export function getAttributes($: CheerioStatic, heading: string, tagName: string return result; } -function getProperty($: CheerioStatic, prop: string) { +function getProperty($: cheerio.Root, prop: string) { const $tr = $('#wikiArticle table.properties tr') || $('#Technical_summary').next('table tr'); const $th = $( $tr @@ -177,7 +177,7 @@ function getProperty($: CheerioStatic, prop: string) { .replace(/(?:\r?\n|\s)+/gi, ' '); } -function getThisOutline($: CheerioStatic, $start: Cheerio) { +function getThisOutline($: cheerio.Root, $start: cheerio.Cheerio) { const $container = $('
'); let $next = $start.next(); const els = [$start.clone()]; @@ -189,7 +189,7 @@ function getThisOutline($: CheerioStatic, $start: Cheerio) { return $container; } -function getItsHeading($start: Cheerio) { +function getItsHeading($start: cheerio.Cheerio) { let $needle = upToPrevOrParent($start); while ($needle.length) { if (isHeading($needle)) { @@ -200,7 +200,7 @@ function getItsHeading($start: Cheerio) { return null; } -function upToPrevOrParent($start: Cheerio) { +function upToPrevOrParent($start: cheerio.Cheerio) { let $needle = $start.prev(); if (!$needle.length) { $needle = $start.parent(); @@ -208,7 +208,7 @@ function upToPrevOrParent($start: Cheerio) { return $needle; } -function isHeading($el: Cheerio) { +function isHeading($el: cheerio.Cheerio) { return /^h[1-6]$/i.test($el[0].tagName); } diff --git a/packages/@markuplint/html-spec/package.json b/packages/@markuplint/html-spec/package.json index fa2a3779e..2631dc683 100644 --- a/packages/@markuplint/html-spec/package.json +++ b/packages/@markuplint/html-spec/package.json @@ -15,13 +15,13 @@ "gen": "ts-node gen/index.ts; prettier --write index.json" }, "devDependencies": { - "@types/cheerio": "^0.22.18", - "@types/cli-progress": "^3.7.0", + "@types/cheerio": "^0.22.22", + "@types/cli-progress": "^3.8.0", "@types/node-fetch": "^2.5.7", "cheerio": "^1.0.0-rc.3", "cli-progress": "^3.8.2", - "fast-xml-parser": "^3.17.2", - "node-fetch": "^2.6.0" + "fast-xml-parser": "^3.17.4", + "node-fetch": "^2.6.1" }, "dependencies": { "@markuplint/ml-spec": "^1.0.0-alpha.11" From bb62959e232097b70e8b55a3d9f995de611ebb8f Mon Sep 17 00:00:00 2001 From: yusukehirao Date: Mon, 9 Nov 2020 16:35:53 +0900 Subject: [PATCH 2/8] Update description about attributes of the iframe element from MDN docs. --- packages/@markuplint/html-spec/index.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/@markuplint/html-spec/index.json b/packages/@markuplint/html-spec/index.json index a0f4fe9d0..30932fb49 100644 --- a/packages/@markuplint/html-spec/index.json +++ b/packages/@markuplint/html-spec/index.json @@ -4046,23 +4046,23 @@ }, { "name": "allow", - "description": "Specifies a feature policy for the