mirror of
https://github.com/doocs/md.git
synced 2025-02-11 17:20:11 +08:00
fix: code block render abnormal
This commit is contained in:
parent
a25dedf811
commit
4c16dcf34f
@ -158,23 +158,27 @@ export const useStore = defineStore(`store`, () => {
|
||||
outputTemp += `
|
||||
<style>
|
||||
.hljs.code__pre > .mac-sign {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.hljs.code__pre {
|
||||
padding: 0!important;
|
||||
}
|
||||
|
||||
.hljs.code__pre code {
|
||||
display: -webkit-box;
|
||||
padding: 0.5em 1em 1em;
|
||||
overflow-x: auto;
|
||||
text-indent: 0;
|
||||
display: flex;
|
||||
}
|
||||
</style>
|
||||
`
|
||||
}
|
||||
|
||||
outputTemp += `
|
||||
<style>
|
||||
.code__pre {
|
||||
padding: 0 !important;
|
||||
}
|
||||
|
||||
.hljs.code__pre code {
|
||||
display: -webkit-box;
|
||||
padding: 0.5em 1em 1em;
|
||||
overflow-x: auto;
|
||||
text-indent: 0;
|
||||
}
|
||||
</style>
|
||||
`
|
||||
|
||||
output.value = outputTemp
|
||||
}
|
||||
|
||||
|
@ -89,9 +89,9 @@ function transform(legend: string, text: string | null, title: string | null): s
|
||||
|
||||
const macCodeSvg = `
|
||||
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" x="0px" y="0px" width="45px" height="13px" viewBox="0 0 450 130">
|
||||
<ellipse cx="65" cy="65" rx="50" ry="52" stroke="rgb(220,60,54)" stroke-width="2" fill="rgb(237,108,96)" />
|
||||
<ellipse cx="50" cy="65" rx="50" ry="52" stroke="rgb(220,60,54)" stroke-width="2" fill="rgb(237,108,96)" />
|
||||
<ellipse cx="225" cy="65" rx="50" ry="52" stroke="rgb(218,151,33)" stroke-width="2" fill="rgb(247,193,81)" />
|
||||
<ellipse cx="385" cy="65" rx="50" ry="52" stroke="rgb(27,161,37)" stroke-width="2" fill="rgb(100,200,86)" />
|
||||
<ellipse cx="400" cy="65" rx="50" ry="52" stroke="rgb(27,161,37)" stroke-width="2" fill="rgb(100,200,86)" />
|
||||
</svg>
|
||||
`.trim()
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user