Monorepo for Tangled tangled.org

appview/pages: use robust handle regex from indigo/syntax #910

merged opened by oppi.li targeting master from op/vtyvsnwqkrwr

should cut down the false positives a bit. tests are included.

Signed-off-by: oppiliappan me@oppi.li

Labels

None yet.

assignee

None yet.

Participants 1
AT URI
at://did:plc:qfpnj4og54vl56wngdriaxug/sh.tangled.repo.pull/3maihgf2bvf22
+15
Interdiff #0 โ†’ #1
appview/pages/markup/extension/atlink.go

This patch was likely rebased, as context lines do not match.

+15
appview/pages/markup/markdown_test.go
··· 86 86 markdown: "- Item 1\n- @user.tngl.sh\n- Item 3", 87 87 contains: `<a href="/user.tngl.sh" class="mention">@user.tngl.sh</a>`, 88 88 }, 89 + { 90 + name: "at mention in link", 91 + markdown: "[@regnault.dev](https://regnault.dev)", 92 + contains: `<a href="https://regnault.dev">@regnault.dev</a>`, 93 + }, 94 + { 95 + name: "at mention in link again", 96 + markdown: "[check out @regnault.dev](https://regnault.dev)", 97 + contains: `<a href="https://regnault.dev">check out @regnault.dev</a>`, 98 + }, 99 + { 100 + name: "at mention in link again, multiline", 101 + markdown: "[\ncheck out @regnault.dev](https://regnault.dev)", 102 + contains: "<a href=\"https://regnault.dev\">\ncheck out @regnault.dev</a>", 103 + }, 89 104 } 90 105 91 106 for _, tt := range tests {

History

2 rounds 0 comments
sign up or login to add to the discussion
oppi.li submitted #1
1 commit
expand
appview/pages: use robust handle regex from indigo/syntax
3/3 success
expand
expand 0 comments
pull request successfully merged
oppi.li submitted #0
1 commit
expand
appview/pages: use robust handle regex from indigo/syntax
3/3 success
expand
expand 0 comments