Merge pull request #180 from lbryio/empty-markup-fix

no empty markup divs
This commit is contained in:
netop:// ウェッブ 2018-10-11 20:48:10 -05:00 committed by GitHub
commit 8e8c9ba231
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -50,7 +50,7 @@ export default path => {
const updatedMarkdown = wikiFinder(partialFinder(renderedMarkdown));
return html`
<div class="page__markup">${raw(updatedMarkdown)}</div>
${raw(updatedMarkdown)}
`;
};
@ -81,7 +81,7 @@ function partialFinder(markdownBody) {
}
}
return markdownBody;
return ("<div class=\"page__markup\">" + markdownBody + "</div>").replace(/<div class="page__markup">\s*<\/div>/, "");
}
function wikiFinder(markdownBody) {