From 23b80994499855c496d60fa8f7f9327fc4ab552b Mon Sep 17 00:00:00 2001 From: Benjy Cui Date: Fri, 27 May 2016 15:11:18 +0800 Subject: [PATCH] site: fix style tag --- site/bisheng-plugin-antd/lib/process-demo.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/site/bisheng-plugin-antd/lib/process-demo.js b/site/bisheng-plugin-antd/lib/process-demo.js index 4a6c4e14c2..0c5584de38 100644 --- a/site/bisheng-plugin-antd/lib/process-demo.js +++ b/site/bisheng-plugin-antd/lib/process-demo.js @@ -71,7 +71,8 @@ module.exports = (markdownData) => { if (isStyleTag(styleNode)) { markdownData.style = JsonML.getChildren(styleNode)[0]; } else if (styleNode) { - markdownData.style = getCode(styleNode); + const styleTag = contentChildren.find(isStyleTag); + markdownData.style = getCode(styleNode) + (styleTag ? JsonML.getChildren(styleTag)[0] : ''); markdownData.highlightedStyle = JsonML.getAttributes(styleNode).highlighted; }