Skip to content

Commit

Permalink
fix: fix regex expression (#533)
Browse files Browse the repository at this point in the history
  • Loading branch information
honwhy authored Feb 14, 2025
1 parent e0c41ca commit c1922cf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/utils/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@ export function processClipboardContent(primaryColor: string) {

// 处理样式和颜色变量
clipboardDiv.innerHTML = clipboardDiv.innerHTML
.replace(/top:(.*?)em/g, `transform: translateY($1em)`)
.replace(/([^-])top:(.*?)em/g, `$1transform: translateY($2em)`)
.replace(/hsl\(var\(--foreground\)\)/g, `#3f3f3f`)
.replace(/var\(--blockquote-background\)/g, `#f7f7f7`)
.replace(/var\(--md-primary-color\)/g, primaryColor)
Expand Down

0 comments on commit c1922cf

Please sign in to comment.