flutter_linkify icon indicating copy to clipboard operation
flutter_linkify copied to clipboard

Link placeholder / custom name

Open tomekit opened this issue 2 years ago • 2 comments

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: https://github.com/Cretezy/flutter_linkify/issues/124

tomekit avatar Oct 30 '23 10:10 tomekit

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./?=#]+)\)$/

tomekit avatar Oct 30 '23 10:10 tomekit