Skip to content

Commit

Permalink
bugfix: svg url中id name被误转为绝对路径 (#59)
Browse files Browse the repository at this point in the history
Co-authored-by: wanglei002 <[email protected]>
  • Loading branch information
leossw and wanglei002 authored Jan 16, 2021
1 parent e1c90aa commit 98cc4ee
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/snapshot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ function extractOrigin(url: string): string {
}

const URL_IN_CSS_REF = /url\((?:(')([^']*)'|(")([^"]*)"|([^)]*))\)/gm;
const RELATIVE_PATH = /^(?!www\.|(?:http|ftp)s?:\/\/|[A-Za-z]:\\|\/\/).*/;
const RELATIVE_PATH = /^(?!www\.|(?:http|ftp)s?:\/\/|[A-Za-z]:\\|\/\/|#).*/;
const DATA_URI = /^(data:)([^,]*),(.*)/i;
export function absoluteToStylesheet(
cssText: string | null,
Expand Down

0 comments on commit 98cc4ee

Please sign in to comment.