From c91a2d2de7c83fe3e05bf3d5cf71c77c3c7029c2 Mon Sep 17 00:00:00 2001 From: Dave Lucia Date: Wed, 9 Oct 2024 16:39:19 -0400 Subject: [PATCH] Fix raw_html/2 typespec (#593) 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