Skip to content

Conversation

remram44
Copy link
Contributor

Kinda-fixes PyCQA/baron#66: the example notebook linked there now works (if input is bytes).

remram44 added 2 commits May 28, 2015 15:43
Do no make Pygments encode highlighted source code, keep unicode. This
is already done for NodeList and ProxyList, fix Node and EndlNode.
NodeList and ProxyList do a unicode join() to construct the final
unicode object; ths makes every element unicode to begin with, to avoid
automatic decoding.
@Psycojoker
Copy link
Member

Hello,

Do you think that it's possible to write a test for that? Nevertheless, thanks a lot for this pull request :)

Kinds regards,

@remram44
Copy link
Contributor Author

I'm sure I can make you something... There's a risk I might find other unicode-related issues though 😉

@ibizaman
Copy link
Collaborator

That would be great!

@remram44
Copy link
Contributor Author

As I thought, RedBaron() expects bytes on Python 2 and str on Python 3 😢

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?

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.

Baron fails on non-ASCII unicode input
3 participants