From 23b60dc1975db38c280d8a123aff97544d1673e0 Mon Sep 17 00:00:00 2001 From: HelenHuang <LinHuang@pollex.com.tw> Date: 星期四, 09 六月 2022 15:34:21 +0800 Subject: [PATCH] TODO#139890 FAQ 常見問題 1-文案調整 --- PAMapp/node_modules/node-html-parser/node_modules/css-select/lib/compile.js | 16 ++++++++++------ 1 files changed, 10 insertions(+), 6 deletions(-) diff --git a/PAMapp/node_modules/node-html-parser/node_modules/css-select/lib/compile.js b/PAMapp/node_modules/node-html-parser/node_modules/css-select/lib/compile.js index 4f3e29a..fc736d6 100644 --- a/PAMapp/node_modules/node-html-parser/node_modules/css-select/lib/compile.js +++ b/PAMapp/node_modules/node-html-parser/node_modules/css-select/lib/compile.js @@ -19,11 +19,11 @@ */ function compile(selector, options, context) { var next = compileUnsafe(selector, options, context); - return subselects_1.ensureIsTag(next, options.adapter); + return (0, subselects_1.ensureIsTag)(next, options.adapter); } exports.compile = compile; function compileUnsafe(selector, options, context) { - var token = typeof selector === "string" ? css_what_1.parse(selector, options) : selector; + var token = typeof selector === "string" ? (0, css_what_1.parse)(selector) : selector; return compileToken(token, options, context); } exports.compileUnsafe = compileUnsafe; @@ -33,11 +33,15 @@ (Array.isArray(t.data) && t.data.some(function (data) { return data.some(includesScopePseudo); })))); } -var DESCENDANT_TOKEN = { type: "descendant" }; +var DESCENDANT_TOKEN = { type: css_what_1.SelectorType.Descendant }; var FLEXIBLE_DESCENDANT_TOKEN = { type: "_flexibleDescendant", }; -var SCOPE_TOKEN = { type: "pseudo", name: "scope", data: null }; +var SCOPE_TOKEN = { + type: css_what_1.SelectorType.Pseudo, + name: "scope", + data: null, +}; /* * CSS 4 Spec (Draft): 3.3.1. Absolutizing a Scope-relative Selector * http://www.w3.org/TR/selectors4/#absolutizing @@ -51,7 +55,7 @@ })); for (var _i = 0, token_1 = token; _i < token_1.length; _i++) { var t = token_1[_i]; - if (t.length > 0 && procedure_1.isTraversal(t[0]) && t[0].type !== "descendant") { + if (t.length > 0 && (0, procedure_1.isTraversal)(t[0]) && t[0].type !== "descendant") { // Don't continue in else branch } else if (hasContext && !t.some(includesScopePseudo)) { @@ -99,7 +103,7 @@ return rules.reduce(function (previous, rule) { return previous === boolbase_1.falseFunc ? boolbase_1.falseFunc - : general_1.compileGeneralSelector(previous, rule, options, context, compileToken); + : (0, general_1.compileGeneralSelector)(previous, rule, options, context, compileToken); }, (_a = options.rootFunc) !== null && _a !== void 0 ? _a : boolbase_1.trueFunc); } function reduceRules(a, b) { -- Gitblit v1.8.0