-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: support bare URLs in angle brackets
## Details Request: #244 Bare URLs in angle brackets are parsed by treesitter into a uri_autolink node. Add support for this node type in our link renderer. Use the icon based on the destination. Functions similarly to emails in that the angle brackets are hidden while the link contents are still displayed with the addition of the icon.
- Loading branch information
1 parent
61850bf
commit 401a6c9
Showing
8 changed files
with
62 additions
and
19 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -74,6 +74,11 @@ describe('ad_hoc.md', function() | |
link(row:get(), 2, 20, ' [email protected]', 'Link', ''), | ||
}) | ||
|
||
vim.list_extend(expected, { | ||
util.bullet(row:increment(), 0, 1), | ||
link(row:get(), 2, 26, ' http://www.github.com/', 'Link', ''), | ||
}) | ||
|
||
vim.list_extend(expected, { | ||
util.bullet(row:increment(), 0, 1), | ||
link(row:get(), 2, 61, ' ', 'Link', nil), | ||
|
@@ -96,10 +101,11 @@ describe('ad_hoc.md', function() | |
' 8 ● Basic One Then normal text', | ||
' 9 ● With Alias Something important', | ||
' 10 ● [email protected] Email', | ||
' 11 ● Youtube Link', | ||
' 12 ● Footnote Link ¹ ᴵⁿᶠᵒ', | ||
' 13', | ||
' 14 ¹ ᴵⁿᶠᵒ: Some Info', | ||
' 11 ● http://www.github.com/ Bare URL', | ||
' 12 ● Youtube Link', | ||
' 13 ● Footnote Link ¹ ᴵⁿᶠᵒ', | ||
' 14', | ||
' 15 ¹ ᴵⁿᶠᵒ: Some Info', | ||
}) | ||
end) | ||
end) |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,6 +8,7 @@ Heading 2 Line 2 | |
- [[Basic One]] Then normal text | ||
- [[Nickname|With Alias]] Something important | ||
- <[email protected]> Email | ||
- <http://www.github.com/> Bare URL | ||
- [Youtube Link](https://www.youtube.com/watch?v=dQw4w9WgXcQ) | ||
- Footnote Link [^1 Info] | ||
|
||
|