Closed jneen closed 5 years ago
ack, nevermind, someone did this already! what I get for searching issues instead of PRs :p https://github.com/jneen/rouge/pull/324
raise ... from
also causes problems.
raise RuntimeError('Object cannot be packed') from e
@rumpelsepp are you using the latest git code? I thought I fixed yield and raise in #324 .
(Hi there! I guess this issue can certainly be closed thanks to #324 and https://github.com/jneen/rouge/commit/81c08594e8ef08fcc16d5b3968de037321ca49af 😊 )
This can be closed too @pyrmont
Thanks @robin850 and @miparnisari :)
From what I've seen so far, the lexer seems to work for most Python 3 syntax, with the exception of the new
yield from
statement in Python 3.3: https://docs.python.org/3/whatsnew/3.3.html#pep-380-syntax-for-delegating-to-a-subgeneratorlooks like this is because the
from
keyword immediately kicks the lexer state into "importing" mode, so the fix should be relatively simple: https://github.com/jneen/rouge/blob/master/lib/rouge/lexers/python.rb#L98-L101I'll take a look at a PR for this soon, but wanted to leave a comment in case I didn't get the chance to come back to this issue :)