Fix lint errors

Replaces unintentional character range and reorders by ASCII code.
This commit is contained in:
Texas Toland 2025-03-18 17:33:09 +08:00
parent 4cbdff68d9
commit 1902f4cf76

View file

@ -36,15 +36,16 @@ class InlineTagWidget extends WidgetType {
}
}
// (?<! # skip if
// ]\( # Markdown link
// (?<! # skip if
// ]\( # Markdown link
// )
// https:\/\/github\.com\/ # literal github.com/
// [ # valid characters:
// \w # alphanumeric or underscore
// $-.~!*'();:@&=+$,\/?%#[\] # valid special characters
// ]+ # repeating and required
export const matchRegexp = /(?<!]\()https:\/\/github\.com\/[\w$-.~!*'();:@&=+$,\/?%#[\]]+/g;
// https:\/\/github\.com\/ # literal github.com/
// [ # valid characters:
// \w # alphanumeric or _
// #-/! # all lower ASCII except "
// :;=?@[\]~ # misc. in ASCII order
// ]+ # repeating and required
export const matchRegexp = /(?<!]\()https:\/\/github\.com\/[\w#-/!:;=?@[\]]+/g;
export function createInlineViewPlugin(_plugin: GithubLinkPlugin) {
class InlineViewPluginValue implements PluginValue {