fix: docs markdown smartypants (#2671)
This was a regression introduced in https://github.com/denoland/fresh/pull/2655 Fixes https://github.com/denoland/fresh/issues/2670
This commit is contained in:
@@ -31,15 +31,14 @@ class DefaultRenderer extends Marked.Renderer {
|
||||
override text(
|
||||
token: Marked.Tokens.Text | Marked.Tokens.Escape | Marked.Tokens.Tag,
|
||||
): string {
|
||||
let text = token.text;
|
||||
if (
|
||||
token.type === "text" && "tokens" in token && token.tokens !== undefined
|
||||
) {
|
||||
text = this.parser.parseInline(token.tokens);
|
||||
return this.parser.parseInline(token.tokens);
|
||||
}
|
||||
|
||||
// Smartypants typography enhancement
|
||||
return text
|
||||
return token.text
|
||||
.replaceAll("...", "…")
|
||||
.replaceAll("--", "—")
|
||||
.replaceAll("---", "–")
|
||||
|
||||
Reference in New Issue
Block a user