Lukasa / language-restructuredtext

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

Standalone URL highlighting stops at first underscore #27

Closed peterjc closed 8 years ago

peterjc commented 8 years ago

e.g. Opening this file https://github.com/peterjc/galaxy_blast/blob/2c44d9e2346b18ebb0046121dbb44e4189a6d6ff/README.rst in Atom with default settings the URLs are in purple, however, there is a problem when there is an underscore in the URL, e.g.

...

The main focus of this work is the development of the NCBI BLAST+ command line
tool wrappers and datatype definitions for Galaxy, published on the Galaxy
Tool Shed here:

* http://toolshed.g2.bx.psu.edu/view/devteam/ncbi_blast_plus/
* http://toolshed.g2.bx.psu.edu/view/devteam/blast_datatypes/

...

Bug Reports
===========

You can file an issue here https://github.com/peterjc/galaxy_blast/issues or ask
us on the Galaxy development list http://lists.bx.psu.edu/listinfo/galaxy-dev

...

Here only http://toolshed.g2.bx.psu.edu/view/devteam/ncbi is purple, with _blast_plus/ in normal text color. Likewise with the other URLs with an underscore (not just in bullet lists, but also in plain text paragraphs).

Update: Tested with Atom 1.2.4 with language-restructuredtext v0.10.0 under Mac OS X 10.10.5

Lukasa commented 8 years ago

Hmm, looks like Atom broke this in an upgrade at some point. I can't see this in the language definitions for reStructuredText at all, which makes sense: I wonder if this is internal Atom highlighting?

peterjc commented 8 years ago

I was puzzled too when I looked at the RST code - so the URL pattern is defined in Atom itself then?

Lukasa commented 8 years ago

I think so: it would explain why this is so closely tied to Atom version.

peterjc commented 8 years ago

You're right - I can reproduce this in the base install of Atom 1.2.4 using (for example) Github Markup. I therefore think this is a problem in the bundled language-hyperlink package, see https://github.com/atom/language-hyperlink/issues/7

Lukasa commented 8 years ago

Thanks @peterjc!