mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-09-21 21:30:47 +02:00
Update demo web page to remove recognized front matter from rendered HTML output.
This commit is contained in:
parent
f956dd089f
commit
dda89f90d4
2 changed files with 2 additions and 0 deletions
|
@ -2,6 +2,7 @@
|
|||
|
||||
export { applyFixes, getVersion } from "markdownlint";
|
||||
export { lint as lintSync } from "markdownlint/sync";
|
||||
export { frontMatterRe } from "markdownlint/helpers";
|
||||
export { compile, parse, postprocess, preprocess } from "micromark";
|
||||
export { directive, directiveHtml } from "micromark-extension-directive";
|
||||
export { gfmAutolinkLiteral, gfmAutolinkLiteralHtml } from "micromark-extension-gfm-autolink-literal";
|
||||
|
|
|
@ -49,6 +49,7 @@
|
|||
|
||||
// Renders Markdown to HTML
|
||||
function render(markdown) {
|
||||
markdown = markdown.replace(markdownlint.frontMatterRe, "");
|
||||
const match = /^\?renderer=([a-z-]+)$/.exec(globalThis.location.search);
|
||||
const renderer = match ? match[1] : "micromark";
|
||||
if (renderer === "markdown-it") {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue