Merge pull request #1577 from ifwwww/dev

修复背景渐变色无法生效
This commit is contained in:
Jerry Wong
2024-10-07 15:37:03 +08:00
committed by GitHub
Unverified
+1 -1
View File
@@ -82,7 +82,7 @@ hexo.extend.helper.register('getBgPath', path => {
const absoluteUrlPattern = /^(?:[a-z][a-z\d+.-]*:)?\/\//i
const relativeUrlPattern = /^(\.\/|\.\.\/|\/|[^/]+\/).*$/
const colorPattern = /^(#|rgb|rgba|hsl|hsla|linear-gradient|radial-gradient)/i
const colorPattern = /^(#|rgb|rgba|hsl|hsla)/i
if (colorPattern.test(path)) {
return `background-color: ${path};`