mirror of
https://github.com/revoltchat/revite.git
synced 2024-11-28 18:00:59 -05:00
fix(markdown): enable linkify, disable fuzzyLink
This commit is contained in:
parent
d82573b5fc
commit
3cf8c64d7c
2 changed files with 4 additions and 1 deletions
2
external/lang
vendored
2
external/lang
vendored
|
@ -1 +1 @@
|
||||||
Subproject commit bf0fd028b7702801483d4d491960b3f8af1b8c81
|
Subproject commit faafd6e4f3cf955d6cb684d9bec9de31e62f301a
|
|
@ -48,6 +48,7 @@ if (typeof window !== "undefined") {
|
||||||
|
|
||||||
export const md: MarkdownIt = MarkdownIt({
|
export const md: MarkdownIt = MarkdownIt({
|
||||||
breaks: true,
|
breaks: true,
|
||||||
|
linkify: true,
|
||||||
highlight: (str, lang) => {
|
highlight: (str, lang) => {
|
||||||
const v = Prism.languages[lang];
|
const v = Prism.languages[lang];
|
||||||
if (v) {
|
if (v) {
|
||||||
|
@ -73,6 +74,8 @@ export const md: MarkdownIt = MarkdownIt({
|
||||||
errorColor: "var(--error)",
|
errorColor: "var(--error)",
|
||||||
});
|
});
|
||||||
|
|
||||||
|
md.linkify.set({ fuzzyLink: false });
|
||||||
|
|
||||||
// TODO: global.d.ts file for defining globals
|
// TODO: global.d.ts file for defining globals
|
||||||
declare global {
|
declare global {
|
||||||
interface Window {
|
interface Window {
|
||||||
|
|
Loading…
Reference in a new issue