Have the LLM use square bracketed links for internal references

This commit is contained in:
Claudio Ortolina
2026-04-13 14:24:36 +01:00
parent 96bb0fc403
commit 6a6410bcaa
3 changed files with 23 additions and 10 deletions
+3 -2
View File
@@ -83,10 +83,11 @@ defmodule MusicLibraryWeb.MarkdownTest do
assert result =~ ~s(href="http://example.com")
end
test "adds target to double bracket links" do
test "does not add target to internal links" do
result = Markdown.to_html("Check [[Porcupine Tree]]", link_target: "_blank")
assert result =~ ~s(target="_blank")
refute result =~ ~s(target="_blank")
assert result =~ ~s(href="/collection?query=Porcupine+Tree")
assert result =~ "Porcupine Tree</a>"
end