fix link detection (#93)
Some checks failed
Lint and Format Check / lint-and-format (pull_request) Has been cancelled
Some checks failed
Lint and Format Check / lint-and-format (pull_request) Has been cancelled
This commit is contained in:
parent
788e83cd3d
commit
5b659d9948
1 changed files with 1 additions and 1 deletions
|
@ -109,7 +109,7 @@ export const cleanCodeBlock = (text: string) => {
|
|||
|
||||
// Keep links
|
||||
text = text.replace(
|
||||
/(http[s]?:\/\/(?:[a-zA-Z]|[0-9]|[$-_@.&+]|[!*(),]|(?:%[0-9a-fA-F][0-9a-fA-F]))+)/g,
|
||||
/https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b[-a-zA-Z0-9()@:%_+.~#?&//=]*/g,
|
||||
function (url: string) {
|
||||
return `\`${url}\``;
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue