소스 검색

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

hetech 6 년 전
부모
커밋
330800016d
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      build/md-loader/containers.js

+ 1 - 1
build/md-loader/containers.js

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