Skip to content

Commit

Permalink
fix: locate the bug (#233)
Browse files Browse the repository at this point in the history
* fix: locate the bug

* fix: update regular expression

* fix #196
  • Loading branch information
YangFong committed Jul 29, 2023
1 parent 6847c50 commit 5f54429
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/CodemirrorEditor/EditorHeader/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -341,8 +341,8 @@ export default {
clipboardDiv.innerHTML = mergeCss(clipboardDiv.innerHTML)
if (this.isMacCodeBlock) {
clipboardDiv.innerHTML = clipboardDiv.innerHTML.replaceAll(
/(<code class="prettyprint.+?(?<=style="))/g,
`$1font-family: Menlo, 'Operator Mono', Consolas, Monaco, monospace;`
/(<code class="prettyprint[^>]*)(style=")/g,
`$1style="font-family: Menlo, 'Operator Mono', Consolas, Monaco, monospace;`
)
}
clipboardDiv.focus()
Expand Down

0 comments on commit 5f54429

Please sign in to comment.