Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No syntax highlighting in the submitted solution #15

Closed
stevejb71 opened this issue Feb 20, 2017 · 13 comments
Closed

No syntax highlighting in the submitted solution #15

stevejb71 opened this issue Feb 20, 2017 · 13 comments
Labels
paused Work paused until further notice

Comments

@stevejb71
Copy link
Contributor

I submitted a solution for hello-world, got no syntax highlighting on the code.

@yurrriq
Copy link
Member

yurrriq commented Feb 20, 2017

/cc @kytrinyx. GitHub has Idris highlighting support or worst case, Haskell highlighting would probably be better than nothing.

@kytrinyx
Copy link
Member

Does http://github.com/jneen/rouge have idris support under a different name? If so we can map it to what we have in https://github.com/exercism/exercism.io/blob/master/lib/exercism/syntax_highlighter.rb#L6-L15

@yurrriq
Copy link
Member

yurrriq commented Feb 20, 2017

Looks like it doesn't. Purportedly Pygments style sheets are compatible and iirc Pygments supports Idris. Could we adapt it for Exercism?

@kytrinyx
Copy link
Member

If pygments supports it, how hard would it be to add it to rouge?

@NobbZ
Copy link
Member

NobbZ commented Jun 10, 2017

I just looked into the pygmens repo, I wasn't able to find a lexer for idris, also it is NOT listed on the page of supported languages.

So there is no pygments support we could port.

So I forked rogue yesterday and played around a bit, it seems to be not that hard to implement new lexers. The DSL is pretty simple. A problem is though, that there is no formal description of Idris' syntax and the parser code of the compiler itself... Well it needs to get cleaned up a bit ;) So I can't extract the necessary information from there.

I'm slowly starting to adapt some snippets from the Haskell Lexer though. But since I do currently have only a very limited amount of spare time, it might take a while until I have something I could PR to rogue.

@yurrriq
Copy link
Member

yurrriq commented Jun 10, 2017

Not sure if this would be of any use: https://github.com/david-christiansen/idris-code-highlighter

@yurrriq
Copy link
Member

yurrriq commented Jun 10, 2017

If nothing else, you might be able to reverse engineer the output of idris --highlight (which doesn't need that repo).

@NobbZ
Copy link
Member

NobbZ commented Jun 10, 2017

Davids Highlighter transforms the output of idris --highlight into HTML or LaTeX, so it relies on Idris beeing installed, and does not actually parse/scan idris sources, but a preformatted output. that is meant to be read by machines.

Also reverse engineering idris --highlight will be near to impossible because of semantic highlighting. Also it works on the AST which was generated by the parser, which is a little bit messy and not really straightforward.

@yurrriq
Copy link
Member

yurrriq commented Jun 10, 2017

Quite right. There ought to be formal description somewhere..

@NobbZ
Copy link
Member

NobbZ commented Jun 10, 2017 via email

@yurrriq
Copy link
Member

yurrriq commented Jun 10, 2017

I'd recommend IRC too.

@yurrriq
Copy link
Member

yurrriq commented Jun 10, 2017

It looks like maybe GitHub uses this for GFM.

@NobbZ
Copy link
Member

NobbZ commented Jun 10, 2017 via email

@kytrinyx kytrinyx added the paused Work paused until further notice label Nov 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
paused Work paused until further notice
Projects
None yet
Development

No branches or pull requests

4 participants