mirror of https://github.com/ElemeFE/element
chore: hide demo description when it's empty (#15014)
parent
5a895bd612
commit
330800016d
|
@ -11,7 +11,7 @@ module.exports = md => {
|
|||
const description = m && m.length > 1 ? m[1] : '';
|
||||
const content = tokens[idx + 1].type === 'fence' ? tokens[idx + 1].content : '';
|
||||
return `<demo-block>
|
||||
<div>${md.render(description)}</div>
|
||||
${description ? `<div>${md.render(description)}</div>` : ''}
|
||||
<!--element-demo: ${content}:element-demo-->
|
||||
`;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue