Skip to content

Commit

Permalink
Fix empty link regex [[]]
Browse files Browse the repository at this point in the history
  • Loading branch information
SkepticMystic committed Jun 19, 2021
1 parent d164743 commit a3210ee
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,20 +118,20 @@ class BreadcrumbsView extends ItemView {
// Regex to match the `parent` metadata field
const parentField = this.settings.parentFieldName;
const getParentLinksRegex = new RegExp(
`.*?${parentField}::? ?(\\[\\[.*\\]\\])`
`.*?${parentField}::? ?(\\[\\[.+\\]\\])`
);

// Regex to match the `child` metadata field
const childField = this.settings.childFieldName;
const getChildLinksRegex = new RegExp(
`.*?${childField}::? ?(\\[\\[.*\\]\\])`,
`.*?${childField}::? ?(\\[\\[.+\\]\\])`,
"i"
);

// Regex to match the `sibling` metadata field
const siblingField = this.settings.siblingFieldName;
const getSiblingLinksRegex = new RegExp(
`.*?${siblingField}::? ?(\\[\\[.*\\]\\])`,
`.*?${siblingField}::? ?(\\[\\[.+\\]\\])`,
"i"
);

Expand Down

0 comments on commit a3210ee

Please sign in to comment.