mirror of
https://github.com/doocs/md.git
synced 2024-11-24 19:10:34 +08:00
fix: locate the bug (#233)
* fix: locate the bug * fix: update regular expression * fix #196
This commit is contained in:
parent
6847c50091
commit
5f544291e5
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user