postcss-html
Advanced tools
Comparing version 1.4.1 to 1.5.0
@@ -6,6 +6,7 @@ "use strict"; | ||
const buildTemplateSyntax = require("../template/syntax"); | ||
const SvelteTokenizer = require("./svelte-tokenizer"); | ||
const JsxLikeTokenizer = require("./jsx-like-tokenizer"); | ||
const AstroTokenizer = require("./astro-tokenizer"); | ||
const { cssSafeSyntax } = require("../syntax/syntaxes"); | ||
function iterateCode(source, { onStyleTag, onStyleAttribute, svelte }) { | ||
function iterateCode(source, { onStyleTag, onStyleAttribute, svelte, astro }) { | ||
const openTag = {}; | ||
@@ -80,3 +81,3 @@ let disable, ignore, style; | ||
} | ||
const endIndex = parser.tokenizer._index; | ||
const endIndex = parser.endIndex; | ||
const startIndex = endIndex - content.length; | ||
@@ -98,3 +99,3 @@ if ( | ||
{ | ||
Tokenizer: svelte ? SvelteTokenizer : undefined, | ||
Tokenizer: svelte ? JsxLikeTokenizer : astro ? AstroTokenizer : undefined, | ||
} | ||
@@ -133,2 +134,3 @@ ); | ||
const svelte = opts.from && /\.svelte$/i.test(opts.from); | ||
const astro = opts.from && /\.astro$/i.test(opts.from); | ||
@@ -168,2 +170,3 @@ function onStyleTag(style) { | ||
svelte, | ||
astro, | ||
}); | ||
@@ -170,0 +173,0 @@ |
{ | ||
"name": "postcss-html", | ||
"version": "1.4.1", | ||
"version": "1.5.0", | ||
"publishConfig": { | ||
@@ -59,3 +59,4 @@ "access": "public" | ||
"dependencies": { | ||
"htmlparser2": "^7.1.2", | ||
"htmlparser2": "^8.0.0", | ||
"js-tokens": "^8.0.0", | ||
"postcss": "^8.4.0", | ||
@@ -65,3 +66,3 @@ "postcss-safe-parser": "^6.0.0" | ||
"devDependencies": { | ||
"@ota-meshi/eslint-plugin": "^0.10.0", | ||
"@ota-meshi/eslint-plugin": "^0.11.0", | ||
"autoprefixer": "^10.3.7", | ||
@@ -73,10 +74,11 @@ "chai": "^4.3.4", | ||
"eslint-plugin-eslint-comments": "^3.2.0", | ||
"eslint-plugin-json-schema-validator": "^2.0.0", | ||
"eslint-plugin-json-schema-validator": "^3.0.0", | ||
"eslint-plugin-jsonc": "^2.0.0", | ||
"eslint-plugin-node": "^11.1.0", | ||
"eslint-plugin-node-dependencies": "^0.8.0", | ||
"eslint-plugin-node-dependencies": "^0.9.0", | ||
"eslint-plugin-prettier": "^4.0.0", | ||
"eslint-plugin-regexp": "^1.4.1", | ||
"eslint-plugin-yml": "^0.14.0", | ||
"mocha": "^9.1.3", | ||
"eslint-plugin-vue": "^9.0.0", | ||
"eslint-plugin-yml": "^1.0.0", | ||
"mocha": "^10.0.0", | ||
"mocha-chai-jest-snapshot": "^1.1.3", | ||
@@ -86,8 +88,8 @@ "nyc": "^15.1.0", | ||
"postcss-scss": "^4.0.1", | ||
"postcss-styl": "^0.9.0", | ||
"postcss-styl": "^0.11.0", | ||
"prettier": "^2.4.1", | ||
"stylelint": "^14.4.0", | ||
"stylelint-config-standard": "^25.0.0", | ||
"stylelint-config-standard": "^26.0.0", | ||
"sugarss": "^4.0.1" | ||
} | ||
} |
@@ -16,4 +16,6 @@ # PostCSS HTML Syntax | ||
- [Vue Single-File Components](https://vuejs.org/guide/scaling-up/sfc.html) | ||
- [Svelte Components](https://svelte.dev/docs#component-format) | ||
- [Astro Components](https://docs.astro.build/core-concepts/astro-components/) | ||
- [PHP](http://php.net) | ||
- [Vue Single-File Component](https://vue-loader.vuejs.org/spec.html) | ||
- [Quick App](https://doc.quickapp.cn/framework/source-file.html) | ||
@@ -20,0 +22,0 @@ - [XSLT](https://www.w3.org/TR/xslt-30/) |
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
27687
18
735
165
4
25
+ Addedjs-tokens@^8.0.0
+ Addeddom-serializer@2.0.0(transitive)
+ Addeddomhandler@5.0.3(transitive)
+ Addeddomutils@3.1.0(transitive)
+ Addedentities@4.5.0(transitive)
+ Addedhtmlparser2@8.0.2(transitive)
+ Addedjs-tokens@8.0.3(transitive)
- Removeddom-serializer@1.4.1(transitive)
- Removeddomhandler@4.3.1(transitive)
- Removeddomutils@2.8.0(transitive)
- Removedentities@2.2.03.0.1(transitive)
- Removedhtmlparser2@7.2.0(transitive)
Updatedhtmlparser2@^8.0.0