starlight-obsidian 0.4.1 → 0.4.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/libs/remark.ts +3 -2
  2. package/package.json +1 -1
package/libs/remark.ts CHANGED
@@ -595,8 +595,9 @@ function getMarkdownFileNode(file: VFile, fileUrl: string): RootContent {
595
595
  file.data.vault.options.linkFormat === 'relative' ? getRelativeFilePath(file, fileUrl) : fileUrl,
596
596
  )
597
597
  const url = path.posix.join(path.posix.sep, `${filePath}${fileExt}`)
598
-
599
- const matchingFile = file.data.files.find((vaultFile) => vaultFile.path === url)
598
+ const matchingFile = file.data.files.find(
599
+ (vaultFile) => vaultFile.path === url || vaultFile.isEqualStem(filePath) || vaultFile.isEqualFileName(filePath),
600
+ )
600
601
 
601
602
  if (!matchingFile) {
602
603
  return { type: 'text', value: '' }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "starlight-obsidian",
3
- "version": "0.4.1",
3
+ "version": "0.4.2",
4
4
  "license": "MIT",
5
5
  "description": "Starlight plugin to publish Obsidian vaults.",
6
6
  "author": "HiDeoo <github@hideoo.dev> (https://hideoo.dev)",