Fix unicode errors when rendering to IPython notebook
Kinda-fixes Psycojoker/baron#66: the example notebook linked there now works (if input is bytes).
Hello,
Do you think that it's possible to write a test for that? Nevertheless, thanks a lot for this pull request :)
Kinds regards,
I'm sure I can make you something... There's a risk I might find other unicode-related issues though :wink:
That would be great!
As I thought, RedBaron() expects bytes on Python 2 and str on Python 3 :cry:
I added a test, but it doesn't pass on Python 3: it looks like .node_list gives out a list instead of a NodeList, so _repr_html_() doesn't exist?