Merge pull request #141 from nathonius/fix/139/display-text-links

🐛 fix: #139 Adjust url regex to exclude URLs with display text
This commit is contained in:
Nathan 2024-08-19 11:33:35 -04:00 committed by GitHub
commit 8d495d990d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -44,7 +44,7 @@ export function createInlineViewPlugin(_plugin: GithubLinkPlugin) {
public inlineTags: DecorationSet = Decoration.none;
private readonly matcher = new MatchDecorator({
regexp: /(https:\/\/)?github\.com\S+/g,
regexp: /(?<!\[.*?\]\()https:\/\/github\.com\/[^\s,.)]+/g,
decorate: (add, from, to, match, _view) => {
add(
from,