add bare whitespace test

This commit is contained in:
FloatingGhost 2021-12-30 19:46:42 +00:00
parent b6f644545f
commit 2567e2c107

View file

@ -205,6 +205,19 @@ defmodule LinkifyTest do
assert result_text == assert result_text ==
"<a href=\"https://example.com/user/justOne\">#justOne</a>." "<a href=\"https://example.com/user/justOne\">#justOne</a>."
text = "#justOne "
{result_text, %{tags: _tags}} =
Linkify.link_map(text, %{tags: MapSet.new()},
hashtag: true,
hashtag_handler: handler,
hashtag_prefix: "https://example.com/user/",
rel: false
)
assert result_text ==
"<a href=\"https://example.com/user/justOne\">#justOne</a> "
text = "#cofe <br><a href=\"https://pleroma.social/\">Source</a>" text = "#cofe <br><a href=\"https://pleroma.social/\">Source</a>"
{_result_text, %{tags: tags}} = {_result_text, %{tags: tags}} =