forked from abner/for-legacy-web
fix(markdown): enable linkify, disable fuzzyLink
This commit is contained in:
@@ -48,6 +48,7 @@ if (typeof window !== "undefined") {
|
||||
|
||||
export const md: MarkdownIt = MarkdownIt({
|
||||
breaks: true,
|
||||
linkify: true,
|
||||
highlight: (str, lang) => {
|
||||
const v = Prism.languages[lang];
|
||||
if (v) {
|
||||
@@ -73,6 +74,8 @@ export const md: MarkdownIt = MarkdownIt({
|
||||
errorColor: "var(--error)",
|
||||
});
|
||||
|
||||
md.linkify.set({ fuzzyLink: false });
|
||||
|
||||
// TODO: global.d.ts file for defining globals
|
||||
declare global {
|
||||
interface Window {
|
||||
|
||||
Reference in New Issue
Block a user