fix: markdown link attrs matcher, close #284

This commit is contained in:
hanlee 2022-01-25 01:49:50 +09:00
parent ae0bcd2486
commit 1010320cc6
No known key found for this signature in database
GPG Key ID: 17C81448D8058286

View File

@ -89,7 +89,7 @@ export default defineConfig({
// https://prismjs.com/
md.use(Prism)
md.use(LinkAttributes, {
pattern: /^https?:\/\//,
matcher: (link: string) => /^https?:\/\//.test(link),
attrs: {
target: '_blank',
rel: 'noopener',