Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Link placeholder / custom name #127

Open
tomekit opened this issue Oct 30, 2023 · 1 comment
Open

Link placeholder / custom name #127

tomekit opened this issue Oct 30, 2023 · 1 comment

Comments

@tomekit
Copy link

tomekit commented Oct 30, 2023

It would be great to have syntax (or similar):

[docs](https://example.com)

which would allow to provide custom name for the link.
E.g.: docs

Possibly related: #124

@tomekit
Copy link
Author

tomekit commented Oct 30, 2023

Potentially these regexes could be used: https://davidwells.io/snippets/regex-match-markdown-links

/* Match only links that are fully qualified with https */
const fullLinkOnlyRegex = /^\[([\w\s\d]+)\]\((https?:\/\/[\w\d./?=#]+)\)$/

/* Match full links and relative paths */
const regex = /^\[([\w\s\d]+)\]\(((?:\/|https?:\/\/)[\w\d./?=#]+)\)$/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant