fix markdown rendering
This commit is contained in:
parent
7e90e092d6
commit
fc2e34c2a5
1 changed files with 13 additions and 13 deletions
|
@ -62,8 +62,7 @@ function partialFinder(markdownBody) {
|
|||
const regexToFindPartials = /<\w+ ?\/>/g;
|
||||
const partials = markdownBody.match(regexToFindPartials);
|
||||
|
||||
if (!partials) return markdownBody;
|
||||
|
||||
if (partials) {
|
||||
for (const partial of partials) {
|
||||
const filename = decamelize(partial, "-").replace("<", "")
|
||||
.replace("/>", "")
|
||||
|
@ -80,6 +79,7 @@ function partialFinder(markdownBody) {
|
|||
else markdownBody = markdownBody.replace(partial, `</div>${partialFunction.default()}<div class="page__markup">`);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return ("<div class=\"page__markup\">" + markdownBody + "</div>").replace(/<div class="page__markup">\s*<\/div>/, "");
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue