chore: hide demo description when it's empty (#15014)

pull/13770/head^2
hetech 2019-04-09 10:30:48 +08:00 committed by GitHub
parent 5a895bd612
commit 330800016d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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-->
`;
}