mirror of
https://github.com/osmarks/website
synced 2025-03-10 05:28:11 +00:00
highly advanced typography
This commit is contained in:
parent
cc29039444
commit
f8c2de3365
@ -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,
|
||||
|
Loading…
x
Reference in New Issue
Block a user