Fix issue #1588: Multiline Linked Mentions #1688
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This issue is due to that newline characters not being included in the multiline snippet.
Simplified snippet logic and temporarily removed multiline snippets. Please see below.
This is what I have been using locally to make the Linked Mentions look more familiar as a user coming from Logseq.
I will readd multiline logic to this PR depending on what you think.
I feel that for most mentions, adding context lines arbitrarily makes the snippet visually noisy in most cases.
I have the following possibly unwelcome ideas to improve this. I am willing to add them to this PR or separate PRs if you are interested.
Style the context lines with a slightly darker text color or something similar to make the line with the link stand out more. Could hide the context lines behind some sort of caret.
Include the preceding outline parent (see below) while skipping any lines in between and maybe adding an elipsis to indicate the skipped lines.
Include some succeeding outline children for cases where the link is used as a title for those outline children like below