Linguist: JSX Syntax highlighting broken again.

Created on 30 Aug 2016  路  17Comments  路  Source: github/linguist

https://github.com/github/linguist/commit/cb5bc91fe3550f6332c94e19bc74b0a2489bfb27#diff-464b0c6cffb722d15311d573b2265c58R1

language-babel was version locked (See https://github.com/github/linguist/pull/3091) but was updated.

Most helpful comment

If we continue with this pull request, I think we should add a test with the version hardcoded. Otherwise we could update it again by mistake on the next release :/

:stuck_out_tongue_winking_eye:

All 17 comments

Example:

import React from 'react';

var ExampleApplication = React.createClass({
  render: function() {
    var elapsed = Math.round(this.props.elapsed  / 100);
    var seconds = elapsed / 10 + (elapsed % 10 ? '' : '.0' );
    var message =
      'React has been successfully running for ' + seconds + ' seconds.';

    return <p>{message}</p>;
  }
});

var start = new Date().getTime();

setInterval(function() {
  ReactDOM.render(
    <ExampleApplication elapsed={new Date().getTime() - start} />,
    document.getElementById('container')
  );
}, 50);

Yeah, sorry. This is my bad. As part of the Linguist release process we update _all_ the grammars.

I can revert this in the next release of Linguist (next week sometime) but ultimately we need to fix this in upstream master so that I don't accidentally do this again 馃槥

If we continue with this pull request, I think we should add a test with the version hardcoded. Otherwise we could update it again by mistake on the next release :/

:stuck_out_tongue_winking_eye:

Or somebody could fork the guy's repo and use that instead.

Thanks for looking into it :) I think that the fork would be the most long term solution.

@arfon Should I fork the repository in the github-linguist group until the issue is fixed upstream?

The issue will never be fixed upstream. The author of the grammar doesn't give a shit about GitHub's highlighting, only Atom. He's even said so himself.

@arfon Should I fork the repository in the github-linguist group until the issue is fixed upstream?

Let's do it.

@Alhadis upstream can be another grammar ;)

@arfon Done in #3201.

So jsx should work in github PRs now? not sure what merging #3201 actually means for the site.

So jsx should work in github PRs now? not sure what merging #3201 actually means for the site.

It should be working yes. Are you seeing issues?

@morenoh149 Are you seeing broken highlighting in a pull request somewhere?

If so, please file an issue at the forked grammar with links to the affected content.

Shit, man, talk about timing.

@Alhadis I don't think I can open an issue on that fork actually. Don't see the tab.

@pchaigno / @arfon Could you enable issue-tracking for the repo, please? Unless he's supposed to report this particular issue here...

@pchaigno / @arfon Could you enable issue-tracking for the repo, please? Unless he's supposed to report this particular issue here...

@pchaigno could you enable issue tracking on https://github.com/github-linguist/language-babel?

Done. I don't think we can really afford to maintain a fork of the JSX grammar though. The best solution would be to fix the original issue on the parent repository.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Haroenv picture Haroenv  路  4Comments

Sanchez3 picture Sanchez3  路  4Comments

RafaelPAndrade picture RafaelPAndrade  路  4Comments

BnSalahFahmi picture BnSalahFahmi  路  3Comments

arfon picture arfon  路  6Comments