1
0
mirror of https://github.com/osmarks/website synced 2025-03-10 05:28:11 +00:00

highly advanced typography

This commit is contained in:
osmarks 2025-02-02 22:34:36 +00:00
parent cc29039444
commit f8c2de3365

View File

@ -171,6 +171,14 @@ const md = new MarkdownIt({
})
})
.use(require("@vscode/markdown-it-katex").default)
const textRenderer = md.renderer.rules.text
md.renderer.rules.text = (tokens, idx, options, env, self) => {
const token = tokens[idx]
token.content = token.content.replace(/ \- /g, " ") // highly advanced typography
return textRenderer(tokens, idx, options, env, self)
}
const minifyHTML = x => htmlMinifier(x, {
collapseWhitespace: true,
sortAttributes: true,