Lukasa / language-restructuredtext

A ReStructuredText syntax package for Atom
MIT License
27 stars 15 forks source link

python code blocks are mishandled by the restructuredtext package #32

Closed Dowwie closed 8 years ago

Dowwie commented 8 years ago

your atom package is marking embedded Python blocks as full Python code (source.python) instead of embedded Python (source.embedded.python)

if you were to open this rst from within Atom: https://raw.githubusercontent.com/YosaiProject/yosai/master/doc/authorization.rst

scopes at cursor at line 127 shows the following: text.restructuredtext source.gfm.restructuredtext meta.paragraph.restructuredtext source.python meta.function-call.python meta.function-call.arguments.python invalid.illegal.operator.python

please note that I raised this as an issue in the atomlinter project: https://github.com/AtomLinter/linter-flake8/issues/139#issuecomment-171387118

Lukasa commented 8 years ago

Thanks for spotting this! I've just pushed out 0.12.0, which should resolve the problem. =)

Arcanemagus commented 8 years ago

Thanks for fixing this! Didn't want to see this become another https://github.com/atom/language-gfm/issues/121 :stuck_out_tongue:.

Dowwie commented 8 years ago

@Lukasa Not sure you fixed the issue. What do you see in atom for this file, line 126? In my atom editor, it is complaining about my dash underlining. It also doesn't seem to be recognizing ".. note:: "" well either?https://raw.githubusercontent.com/YosaiProject/yosai/master/doc/authorization.rst

Lukasa commented 8 years ago

So I think the problem here is related to #22 and #28, which last I checked were believed to be problems with Atom itself, not with language-restructuredtext. In this case the effect you're seeing is that the syntax highlighting for the code block is not being properly terminated.

Dowwie commented 8 years ago

raised an issue with Atom core : https://github.com/atom/atom/issues/10436