From 66bdb3fae77a7c7aa4da3fb7cba01bfad36ec298 Mon Sep 17 00:00:00 2001 From: Dave Lucia Date: Tue, 1 Oct 2024 15:14:13 -0400 Subject: [PATCH] Fix raw_html/2 typespec The function uses `List.wrap` internally, which means it accepts any `html_node` Inadvertently, I created this bug 6 years ago! --- lib/floki.ex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/floki.ex b/lib/floki.ex index 3291e93e..4135b150 100644 --- a/lib/floki.ex +++ b/lib/floki.ex @@ -247,7 +247,7 @@ defmodule Floki do \"\"\" """ - @spec raw_html(html_tree | binary, keyword) :: binary + @spec raw_html(html_tree() | html_node() | binary(), keyword()) :: binary() defdelegate raw_html(html_tree, options \\ []), to: Floki.RawHTML