mirror of
https://github.com/jackyzha0/quartz.git
synced 2025-12-23 12:58:42 +01:00
lint(links.ts): fix declarations
This commit is contained in:
@@ -58,12 +58,12 @@ export const CrawlLinks: QuartzTransformerPlugin<Partial<Options>> = (userOpts)
|
|||||||
node.properties &&
|
node.properties &&
|
||||||
typeof node.properties.href === "string"
|
typeof node.properties.href === "string"
|
||||||
) {
|
) {
|
||||||
let href = node.properties.href
|
const href = node.properties.href
|
||||||
var dest = href as RelativeURL
|
let dest = href as RelativeURL
|
||||||
var refIcon: string | ElementContent | null = null
|
let refIcon: string | ElementContent | null = null
|
||||||
var matched = false
|
let matched = false
|
||||||
opts.substitutions?.every(([regex, sub]) => {
|
opts.substitutions?.every(([regex, sub]) => {
|
||||||
let parts = href.match(regex)
|
const parts = href.match(regex)
|
||||||
if (parts != null) {
|
if (parts != null) {
|
||||||
dest = parts.slice(1).join("") as RelativeURL
|
dest = parts.slice(1).join("") as RelativeURL
|
||||||
if (typeof sub == "object") {
|
if (typeof sub == "object") {
|
||||||
|
|||||||
Reference in New Issue
Block a user