Skip to content

Commit

Permalink
Fix warnings related to the tokenizer
Browse files Browse the repository at this point in the history
  • Loading branch information
philss committed Jun 28, 2022
1 parent be2b172 commit 47c0904
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions lib/floki/html/tokenizer.ex
Original file line number Diff line number Diff line change
Expand Up @@ -764,19 +764,19 @@ defmodule Floki.HTML.Tokenizer do

# § tokenizer-script-data-escape-start-dash-state

defp script_data_escape_start_dash(<<?-, html::binary>>, s) do
script_data_escaped_dash_dash(
html,
%{
s
| tokens: append_char_token(s, @hyphen_minus)
}
)
end
# defp script_data_escape_start_dash(<<?-, html::binary>>, s) do
# script_data_escaped_dash_dash(
# html,
# %{
# s
# | tokens: append_char_token(s, @hyphen_minus)
# }
# )
# end

defp script_data_escape_start_dash(html, s) do
script_data(html, s)
end
# defp script_data_escape_start_dash(html, s) do
# script_data(html, s)
# end

# § tokenizer-script-data-escaped-state

Expand Down Expand Up @@ -1741,15 +1741,15 @@ defmodule Floki.HTML.Tokenizer do
end

defp comment_end(html, s) do
new_comment = %Comment{s.token | data: [s.token.data | "--"]}
new_comment = %Comment{s.token | data: [s.token.data | ["--"]]}

comment(html, %{s | token: new_comment})
end

# § tokenizer-comment-end-bang-state

defp comment_end_bang(<<?-, html::binary>>, s) do
new_comment = %Comment{s.token | data: [s.token.data | "--!"]}
new_comment = %Comment{s.token | data: [s.token.data | ["--!"]]}

comment_end_dash(html, %{s | token: new_comment})
end
Expand All @@ -1773,7 +1773,7 @@ defmodule Floki.HTML.Tokenizer do
end

defp comment_end_bang(html, s) do
new_comment = %Comment{s.token | data: [s.token.data | "--!"]}
new_comment = %Comment{s.token | data: [s.token.data | ["--!"]]}

comment(html, %{s | token: new_comment})
end
Expand Down

0 comments on commit 47c0904

Please sign in to comment.