fix: render error when render front icon (#806)

This commit is contained in:
Ran Luo 2019-03-25 22:54:35 +08:00 committed by Felix Häusler
parent ef2b12603b
commit c6def5a726

View File

@ -28,6 +28,7 @@ export default function renderIcon (block) {
const { type, functionType, listType } = block
const selector = `a.ag-front-icon`
let icon = null
switch (type) {
case 'p': {
icon = paragraphIcon
@ -44,7 +45,7 @@ export default function renderIcon (block) {
break
}
case 'pre': {
if (functionType === 'fencecode') {
if (functionType === 'fencecode' || functionType === 'indentcode') {
icon = codeIcon
} else if (functionType === 'frontmatter') {
icon = frontMatterIcon