mirror of
https://github.com/alrayyes/wiki.git
synced 2024-11-22 11:36:23 +00:00
fix: allow transcludes of notes with dots (closes #682)
This commit is contained in:
parent
a40dbd55a4
commit
f36376503a
1 changed files with 4 additions and 4 deletions
|
@ -150,7 +150,7 @@ export const ObsidianFlavoredMarkdown: QuartzTransformerPlugin<Partial<Options>
|
||||||
src = src.toString()
|
src = src.toString()
|
||||||
}
|
}
|
||||||
|
|
||||||
src = src.replaceAll(calloutLineRegex, (value) => {
|
src = src.replace(calloutLineRegex, (value) => {
|
||||||
// force newline after title of callout
|
// force newline after title of callout
|
||||||
return value + "\n> "
|
return value + "\n> "
|
||||||
})
|
})
|
||||||
|
@ -162,7 +162,7 @@ export const ObsidianFlavoredMarkdown: QuartzTransformerPlugin<Partial<Options>
|
||||||
src = src.toString()
|
src = src.toString()
|
||||||
}
|
}
|
||||||
|
|
||||||
src = src.replaceAll(wikilinkRegex, (value, ...capture) => {
|
src = src.replace(wikilinkRegex, (value, ...capture) => {
|
||||||
const [rawFp, rawHeader, rawAlias]: (string | undefined)[] = capture
|
const [rawFp, rawHeader, rawAlias]: (string | undefined)[] = capture
|
||||||
|
|
||||||
const fp = rawFp ?? ""
|
const fp = rawFp ?? ""
|
||||||
|
@ -236,7 +236,7 @@ export const ObsidianFlavoredMarkdown: QuartzTransformerPlugin<Partial<Options>
|
||||||
type: "html",
|
type: "html",
|
||||||
value: `<iframe src="${url}"></iframe>`,
|
value: `<iframe src="${url}"></iframe>`,
|
||||||
}
|
}
|
||||||
} else if (ext === "") {
|
} else {
|
||||||
const block = anchor
|
const block = anchor
|
||||||
return {
|
return {
|
||||||
type: "html",
|
type: "html",
|
||||||
|
@ -330,7 +330,7 @@ export const ObsidianFlavoredMarkdown: QuartzTransformerPlugin<Partial<Options>
|
||||||
if (typeof replace === "string") {
|
if (typeof replace === "string") {
|
||||||
node.value = node.value.replace(regex, replace)
|
node.value = node.value.replace(regex, replace)
|
||||||
} else {
|
} else {
|
||||||
node.value = node.value.replaceAll(regex, (substring: string, ...args) => {
|
node.value = node.value.replace(regex, (substring: string, ...args) => {
|
||||||
const replaceValue = replace(substring, ...args)
|
const replaceValue = replace(substring, ...args)
|
||||||
if (typeof replaceValue === "string") {
|
if (typeof replaceValue === "string") {
|
||||||
return replaceValue
|
return replaceValue
|
||||||
|
|
Loading…
Reference in a new issue