siko1056 / language-sphinx

A Sphinx syntax package for Atom
GNU General Public License v3.0
4 stars 3 forks source link

Separate highlighting for inline external links #6

Open Benjamin-Lee opened 6 years ago

Benjamin-Lee commented 6 years ago

For example,

`link text <example.com>`_

would be a link to example.com. Would it be possible to get different highlighting for the example.com part and the remainder of the text?

siko1056 commented 6 years ago

Is this issue closed by v0.1.9 for you?

Benjamin-Lee commented 6 years ago

Yep. Thanks!

Benjamin-Lee commented 6 years ago

Just noticed that when you move the link onto a new line, the highlighting breaks, even though it's valid rst:

example
siko1056 commented 6 years ago

Yes, some rules struggle with this single line restriction. In the code the respective lines responsible for the link formatting are https://github.com/siko1056/language-sphinx/blob/master/grammars/sphinx.cson#L100

Maybe you find faster than me a way to define this grammar rule to span multiple lines? This might get applied to other rules as well.

In the README.md I provided some information at the bottom how to start developing the grammar easily, if you are willing to work on this :wink: