Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

Converting TextMate Language Bundle gives funky syntax highlighting #184

Closed
ernestum opened this issue Aug 27, 2014 · 2 comments
Closed
Labels

Comments

@ernestum
Copy link

I just tried to convert the gnuplot bundle for TextMate to atom, because syntax highlighting for gnuplot is still missing. The conversion works without errors, and atom also shows me, that it thinks it is opening a gnuplot file when I open one (in the bottom right corner) but the syntax highlighting is either nonexisting or just weird (see screenshot
). I know that is not how it should look because of this screencast where the bundle is used in TextMate (see http://vimeo.com/2181877).
Steps to reproduce:
First

apm init --package ~/.atom/packages/language-gnuplot --convert https://github.com/mattfoster/gnuplot-tmbundle

Then open any gnuplot file.

Running under Debian Linux with Atom 0.123.0

@kevinsawicki
Copy link
Contributor

So I looked into this and I believe this is because the grammar has a malformed pattern: https://github.com/mattfoster/gnuplot-tmbundle/blob/1b204c2728e65f027600ed2f7dd21559a0703a92/Syntaxes/gnuplot.tmLanguage#L181

The line contains |) which makes a zero width match and so the parser never advances.

I've forked this bundle and fixed it here: kevinsawicki/gnuplot-tmbundle@1942cc3

If you run apm init using my fork:

apm init --package ~/.atom/packages/language-gnuplot --convert https://github.com/kevinsawicki/gnuplot-tmbundle

it should highlight correctly now:

screen shot 2014-09-12 at 2 38 24 pm

@kevinsawicki
Copy link
Contributor

I've opened up a pull request as well to the bundle: mattfoster/gnuplot-tmbundle#1

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
2 participants