-
Notifications
You must be signed in to change notification settings - Fork 687
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WIP: Fix wikilinks slug querying #386
WIP: Fix wikilinks slug querying #386
Conversation
@@ -91,7 +91,7 @@ export class NoteGraph implements NoteGraphAPI { | |||
// prettier-ignore | |||
const filterFn = | |||
query == null ? (note: Note | null) => note != null | |||
: 'slug' in query ? (note: Note | null) => note?.slug === query.slug | |||
: 'slug' in query ? (note: Note | null) => [nameToSlug(query.slug), query.slug].includes(note?.slug as string) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am checking for both [[Slug Name]] and [[slug-name]] here, however they are defined in the note, so both can be used interchangably.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@SanketDG I have a feeling this wouldn't work with the dataviz graph, have you tested it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes it definitely works with my notes, which all have filenames like "javascript-execution.md" and referenced as [[Javascript Execution]]
, this is uniform throughout.
Any other cases you want me to check?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
This attempts to fix the wikilink generation issues.