mirror of
https://github.com/alrayyes/wiki.git
synced 2025-06-09 15:03:40 +00:00
heading linking
This commit is contained in:
parent
04eeb2d10c
commit
fcd81353f8
7 changed files with 104 additions and 11 deletions
quartz/plugins/transformers
|
@ -42,9 +42,9 @@ export class ObsidianFlavoredMarkdown extends QuartzTransformerPlugin {
|
|||
|
||||
} else {
|
||||
const [path, rawHeader, rawAlias] = capture
|
||||
const header = rawHeader?.slice(1).trim() ?? ""
|
||||
const anchor = rawHeader?.slice(1).trim() ?? ""
|
||||
const alias = rawAlias?.slice(1).trim() ?? path
|
||||
const url = slugify(path.trim() + header)
|
||||
const url = slugify(path.trim() + anchor)
|
||||
return {
|
||||
type: 'link',
|
||||
url,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue