mirror of
https://github.com/doocs/md.git
synced 2025-02-11 17:20:11 +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 = () => {
|
const editorRefresh = () => {
|
||||||
codeThemeChange()
|
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
|
let outputTemp = marked.parse(editor.value!.getValue()) as string
|
||||||
|
|
||||||
// 去除第一行的 margin-top
|
// 去除第一行的 margin-top
|
||||||
|
@ -22,7 +22,7 @@ export interface IOpts {
|
|||||||
size: string
|
size: string
|
||||||
isUseIndent: boolean
|
isUseIndent: boolean
|
||||||
legend?: string
|
legend?: string
|
||||||
status?: boolean
|
citeStatus?: boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
export type ThemeStyles = Record<Block | Inline, ExtendedProperties>
|
export type ThemeStyles = Record<Block | Inline, ExtendedProperties>
|
||||||
|
@ -220,7 +220,7 @@ export function initRenderer(opts: IOpts) {
|
|||||||
if (href === text) {
|
if (href === text) {
|
||||||
return parsedText
|
return parsedText
|
||||||
}
|
}
|
||||||
if (opts.status) {
|
if (opts.citeStatus) {
|
||||||
const ref = addFootnote(title || text, href)
|
const ref = addFootnote(title || text, href)
|
||||||
return `<span ${styles(`link`)}>${parsedText}<sup>[${ref}]</sup></span>`
|
return `<span ${styles(`link`)}>${parsedText}<sup>[${ref}]</sup></span>`
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user