Lukasa / language-restructuredtext

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

syntax highlight issues for unmatched quotes (for apostrophes) #47

Closed tardyp closed 7 years ago

tardyp commented 7 years ago

The following snippet tries to match a closing quote, which it is just an apostrophe. I have no problem if I use http://www.fileformat.info/info/unicode/char/2019/index.htm but I would prefer to stick with ASCII as much as possible.

Twisted's service implementation does not support asynchronous ``startService`` methods.
Alhadis commented 7 years ago

Erm, I'm not sure what the issue is here... what are you seeing, exactly?

Alhadis commented 7 years ago

@tardyp Can you post some screenshots of what you're seeing? I don't see any error highlights with that text.

tardyp commented 7 years ago

Interresting you can't reproduce.. This is for this file: https://raw.githubusercontent.com/buildbot/buildbot/master/master/docs/developer/utils.rst

I get: image

tardyp commented 7 years ago

and for the other issue:

image

Alhadis commented 7 years ago

Ah-hah, I can see what's wrong now. There's a runaway issue in .. py:method:: get(key, \*\*miss_fn_kwargs).

Fixing.

tardyp commented 7 years ago

indeed, those two are related to the same problem (sorry for the noise)

they are triggered by this line

.. py:function:: eventually(cb, args, \*kwargs)

the highlight is fixed when I switch to:

.. py:function:: eventually(cb, _args, *_kwargs)

tardyp commented 7 years ago

interrestingly, when I fixed the \*\* in this file, then the last python snippet is not highlighted anymore

Alhadis commented 7 years ago

Are you using MagicPython by any chance?

tardyp commented 7 years ago

Are you using MagicPython by any chance?

I don't, but it does not change much when I install it

Alhadis commented 7 years ago

Alright, I believe I've fixed it. There is an error with the document you linked to, but I believe that's because of an incorrect backtick:

returned from child services` ``sta

The one that's used after services is what's confusing the highlighter. There's not much we can do about that without impacting the accuracy of other documents where a leading space is used inside a link. Since this is more an authoring issue, I'd prefer to leave that matter as-is.