Skip to content
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

return all possible wiki links or tags as soon as suggest is triggered for [[ or # #122

Merged
merged 3 commits into from
Jan 24, 2021

Conversation

kortina
Copy link
Owner

@kortina kortina commented Jan 24, 2021

Addresses #99.

Typing [[ then doing triggerSuggest will suggest all possible wiki links. Typing # then doing triggerSuggest will suggest all possible tags.

@kortina kortina changed the title return all possible wiki links as soon as suggest is triggered for [[ return all possible wiki links or tags as soon as suggest is triggered for [[ or # Jan 24, 2021
@@ -57,11 +62,7 @@ export class Note {
fsPath: string;
data: string | undefined;
refCandidates: Array<RefCandidate> = [];
title: {
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was suddenly error-ing, some sort of linter issue. I resolved by declaring a new type.

Also, this file got a lot of linter diff lines.

@@ -70,8 +70,8 @@ export class NoteWorkspace {
// This will allow us to potentially expose these as settings.
// Note for the future: \p{L} is used instead of \w , in order to match to all possible letters
// rather than just those from the latin alphabet.
static _rxTagNoAnchors = '(?<= |,|^)#[\\p{L}\\-_]+'; // used to match tags that appear within lines
static _rxTagWithAnchors = '^#[\\p{L}\\-_]+$'; // used to match entire words
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • _rxTagNoAnchors is now _rxTag
  • _rxTagWithAnchors was never used
  • _rxBeginTag now allows matching an empty tag # with the allowed preceding chars

@kortina kortina merged commit a90df19 into master Jan 24, 2021
@kortina kortina deleted the ak-return-suggestions-on-empty-wiki-link branch January 24, 2021 23:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant