commit: 815343e824f0853ec0bb8d91419e7d8f175fa820
parent 175ee6cbea509c16c8afd8c10a1abc77c5e4808a
Author: feld <feld@feld.me>
Date: Tue, 17 Nov 2020 15:49:46 +0000
Merge branch 'chore/readme' into 'master'
Add example to README showing how we link user mentions
See merge request pleroma/elixir-libraries/linkify!28
Diffstat:
1 file changed, 3 insertions(+), 0 deletions(-)
diff --git a/README.md b/README.md
@@ -31,6 +31,9 @@ iex> Linkify.link("google.com", new_window: true)
iex> Linkify.link("google.com", new_window: true, rel: "noopener noreferrer")
"<a href=\"http://google.com\" target=\"_blank\" rel=\"noopener noreferrer\">google.com</a>"
+
+iex> Linkify.link("Hello @niceguy17@pleroma.com", mention: true, mention_prefix: "/users/")
+"Hello <a href=\"/users/niceguy17@pleroma.com\">@niceguy17@pleroma.com</a>"
```
See the [Docs](https://hexdocs.pm/linkify/) for more examples