Skip to content

Commit

Permalink
Fix raw_html/2 typespec (#593)
Browse files Browse the repository at this point in the history
The function uses `List.wrap` internally, which means it accepts any `html_node`

Inadvertently, I created this bug 6 years ago!
  • Loading branch information
davydog187 authored Oct 9, 2024
1 parent 4554b7c commit c91a2d2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/floki.ex
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit c91a2d2

Please sign in to comment.