mirror of
https://github.com/marktext/marktext.git
synced 2025-05-04 06:00:38 +08:00
fix: render error when render front icon (#806)
This commit is contained in:
parent
ef2b12603b
commit
c6def5a726
@ -28,6 +28,7 @@ export default function renderIcon (block) {
|
|||||||
const { type, functionType, listType } = block
|
const { type, functionType, listType } = block
|
||||||
const selector = `a.ag-front-icon`
|
const selector = `a.ag-front-icon`
|
||||||
let icon = null
|
let icon = null
|
||||||
|
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case 'p': {
|
case 'p': {
|
||||||
icon = paragraphIcon
|
icon = paragraphIcon
|
||||||
@ -44,7 +45,7 @@ export default function renderIcon (block) {
|
|||||||
break
|
break
|
||||||
}
|
}
|
||||||
case 'pre': {
|
case 'pre': {
|
||||||
if (functionType === 'fencecode') {
|
if (functionType === 'fencecode' || functionType === 'indentcode') {
|
||||||
icon = codeIcon
|
icon = codeIcon
|
||||||
} else if (functionType === 'frontmatter') {
|
} else if (functionType === 'frontmatter') {
|
||||||
icon = frontMatterIcon
|
icon = frontMatterIcon
|
||||||
|
Loading…
Reference in New Issue
Block a user