Skip to content

Commit

Permalink
fix(postcss): fix regex to filter css to exec postcss (#210)
Browse files Browse the repository at this point in the history
* Some fonts were incorrectly filtered.
  • Loading branch information
akantcheff authored Nov 13, 2023
1 parent 3b88908 commit dc5fbd8
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion gulp.d/tasks/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ module.exports = (src, dest, preview) => () => {
postcssImport,
autoprefixer(),
postcssUrl({
filter: new RegExp('^src/stylesheets/[~][^/]*(?:font|face)[^/]*/.*/files/.+[.](?:ttf|woff2?)$'),
filter: (asset) => /^~[^/]*(?:font|typeface)[^/]*\/files\/.+[.](?:ttf|woff2?)$/.test(asset.url),
url: (asset) => {
const relpath = asset.pathname.substr(1)
const abspath = require.resolve(relpath)
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"preview:build": "gulp preview:build"
},
"devDependencies": {
"@asciidoctor/tabs": "^1.0.0-beta.6",
"@asciidoctor/tabs": "1.0.0-beta.6",
"@csstools/postcss-sass": "^4.0.0",
"asciidoctor": "2.2.6",
"autoprefixer": "~9.7",
Expand Down

0 comments on commit dc5fbd8

Please sign in to comment.