Skip to content

Conversation

@glaucocustodio
Copy link
Contributor

Node tree with comments was crashing before this fix.

lib/floki.ex Outdated
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@glaucocustodio here you don't need to use a guard. Instead, you can pattern match the elem:

defp raw_html([{:comment, value}|tail], html), do: raw_html(tail, html <> "<!--#{value}-->")

@glaucocustodio
Copy link
Contributor Author

Oh man, sorry, I am not too used to pattern match. I've fixed.

philss added a commit that referenced this pull request Oct 9, 2015
@philss philss merged commit b0bbb34 into philss:master Oct 9, 2015
@philss
Copy link
Owner

philss commented Oct 9, 2015

@glaucocustodio no worries 👍

@philss
Copy link
Owner

philss commented Oct 12, 2015

@glaucocustodio Released in the version 0.6.1 :)

@glaucocustodio
Copy link
Contributor Author

😸

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants