logo

auto_linker

AutoLinker-shim, based on https://git.pleroma.social/pleroma/auto_linker git clone https://hacktivis.me/git/auto_linker.git
commit: 372879c8d4dd402ffe82994184a9283695430141
parent 1f8680f4b451f23835bf3fd0d4b0d307fede6de3
Author: Mark Felder <feld@FreeBSD.org>
Date:   Wed, 18 Nov 2020 17:40:10 +0000

Verify trailing periods as sentence punctuation do not link

Diffstat:

Mtest/linkify_test.exs9+++++++++
1 file changed, 9 insertions(+), 0 deletions(-)

diff --git a/test/linkify_test.exs b/test/linkify_test.exs @@ -667,5 +667,14 @@ defmodule LinkifyTest do assert Linkify.link(text) == expected end + + test "Does not link trailing punctuation" do + text = "You can find more info at https://pleroma.social." + + expected = + "You can find more info at <a href=\"https://pleroma.social\">https://pleroma.social</a>." + + assert Linkify.link(text) == expected + end end end