Open
Conversation
|
Somewhat unrelated, but for me this raises the question, why the link format in the first place differs from the default Obsidan way of linking using double braces. [[City Link|City Label]]. Maybe that could be another PR? |
Author
|
I think it differs because it follows the syntax from the original text mapper by Alex Schroeder. Linking wasn’t possible in that obviously, so this was an adaptation. That said, I would also love to be able to link the hex numbers or even the icons to other notes, but that’s definitely a different PR. I think if I’m going to work on this more, I’d actually try to get path labels link-able first. |
Author
|
I have added in the spline commit to this pull request, since it seemed close enough in scope. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What it is
#23 (comment)
NOTE: I am not particularly proficient in TypeScript. The changes I made work in my JavaScript implementation, and I have made an attempt at converting that over, but there might be syntax errors. Please test this before implementing any changes.
This change reduces the number of calls of
computeLinkAndLabeland allows for links which match the labels textually. e.g. the label"New York|New York"produces a label 'New York' that links to the note titled 'New York', where before, no link would be created.computeLinkAndLabelnow returns an additional booleanhasLink.hasLinkis now used instead of the testtextContent !== linkContentto determine whether the link should be created.This change also allows the labels on splines to be linked using the same syntax above.
Tests
Before Screenshot
After Screenshot
Baseline Screenshot