Skip to content

Commit

Permalink
fix: locate the bug
Browse files Browse the repository at this point in the history
  • Loading branch information
YangFong committed Jul 29, 2023
1 parent 6847c50 commit ed77fa6
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/components/CodemirrorEditor/EditorHeader/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -340,6 +340,7 @@ export default {
const clipboardDiv = document.getElementById(`output`)
clipboardDiv.innerHTML = mergeCss(clipboardDiv.innerHTML)
if (this.isMacCodeBlock) {
// FIXME 正则语法无法兼容低版本 safari
clipboardDiv.innerHTML = clipboardDiv.innerHTML.replaceAll(
/(<code class="prettyprint.+?(?<=style="))/g,
`$1font-family: Menlo, 'Operator Mono', Consolas, Monaco, monospace;`
Expand Down

0 comments on commit ed77fa6

Please sign in to comment.