File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
packages/rollup-plugin-html/src/output Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -12,8 +12,7 @@ export interface EmittedAssets {
12
12
}
13
13
14
14
const allowedFileExtensions = [
15
- // https://www.w3.org/TR/html4/types.html#:~:text=ID%20and%20NAME%20tokens%20must,tokens%20defined%20by%20other%20attributes.
16
- / .* \. s v g ( # [ A - Z a - z ] [ A - Z a - z 0 - 9 \- _ : . ] * ) ? / ,
15
+ / .* \. s v g / ,
17
16
/ .* \. p n g / ,
18
17
/ .* \. j p g / ,
19
18
/ .* \. j p e g / ,
@@ -93,9 +92,10 @@ export async function emitAssets(
93
92
visitor : {
94
93
Url : url => {
95
94
// Support foo.svg#bar
95
+ // https://www.w3.org/TR/html4/types.html#:~:text=ID%20and%20NAME%20tokens%20must,tokens%20defined%20by%20other%20attributes.
96
96
const [ filePath , idRef ] = url . url . split ( '#' ) ;
97
97
98
- if ( shouldHandleAsset ( url . url ) ) {
98
+ if ( shouldHandleAsset ( filePath ) ) {
99
99
// Read the font file, get the font from the source location on the FS using asset.filePath
100
100
const assetLocation = path . resolve ( path . dirname ( asset . filePath ) , filePath ) ;
101
101
const assetContent = fs . readFileSync ( assetLocation ) ;
You can’t perform that action at this time.
0 commit comments