mirror of
https://github.com/doocs/md.git
synced 2025-02-11 09:10:08 +08:00
chore: status to citeStatus
This commit is contained in:
parent
f63504a7cc
commit
e946a55f0f
@ -143,7 +143,7 @@ export const useStore = defineStore(`store`, () => {
|
||||
// 更新编辑器
|
||||
const editorRefresh = () => {
|
||||
codeThemeChange()
|
||||
renderer.reset({ status: isCiteStatus.value, legend: legend.value, isUseIndent: isUseIndent.value })
|
||||
renderer.reset({ citeStatus: isCiteStatus.value, legend: legend.value, isUseIndent: isUseIndent.value })
|
||||
let outputTemp = marked.parse(editor.value!.getValue()) as string
|
||||
|
||||
// 去除第一行的 margin-top
|
||||
|
@ -22,7 +22,7 @@ export interface IOpts {
|
||||
size: string
|
||||
isUseIndent: boolean
|
||||
legend?: string
|
||||
status?: boolean
|
||||
citeStatus?: boolean
|
||||
}
|
||||
|
||||
export type ThemeStyles = Record<Block | Inline, ExtendedProperties>
|
||||
|
@ -220,7 +220,7 @@ export function initRenderer(opts: IOpts) {
|
||||
if (href === text) {
|
||||
return parsedText
|
||||
}
|
||||
if (opts.status) {
|
||||
if (opts.citeStatus) {
|
||||
const ref = addFootnote(title || text, href)
|
||||
return `<span ${styles(`link`)}>${parsedText}<sup>[${ref}]</sup></span>`
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user