Skip to content

Commit

Permalink
Merge pull request #281 from ckruse/master
Browse files Browse the repository at this point in the history
fix #280: child nodes might be text nodes
  • Loading branch information
philss committed Jun 18, 2020
2 parents dff9660 + 4579dd2 commit 0580ef7
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions lib/floki.ex
Original file line number Diff line number Diff line change
Expand Up @@ -542,14 +542,18 @@ defmodule Floki do
Enum.reduce(
elements,
[],
fn {_, attributes, _}, acc ->
case attribute_match?(attributes, attr_name) do
{_attr_name, value} ->
[value | acc]

_ ->
acc
end
fn
{_, attributes, _}, acc ->
case attribute_match?(attributes, attr_name) do
{_attr_name, value} ->
[value | acc]

_ ->
acc
end

_, acc ->
acc
end
)

Expand Down

0 comments on commit 0580ef7

Please sign in to comment.