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
Add support for Literate CoffeeScript #408
Conversation
Brilliant! Example https://github.com/jashkenas/coffee-script/blob/master/src/scope.litcoffee should look like https://gist.github.com/jashkenas/3fc3c1a8b1009c00d9df |
@soimort — Cool. Would you be great you can add an example file the |
I'm excited about .litcoffee and I hope that github will implement this. They are one of the biggest and earliest proponents of CoffeeScript! I'd like to see them shown as if it's Markdown with CoffeeScript fenced in code blocks. I guess that would make this a markup issue. In the near future I hope @github adds support for showing the same file with either Markup (if available) or Linguist. I've had to play the game of clicking raw or blame on an .md file that uses a nonstandard dialect plenty of times, so I hope this gets solved whether or not Literate CoffeeScript support is added to Markup. It would be a nice side effect of making it selectable, though, to see more things added to Markup! https://github.com/github/markup Note that there isn't an issue on https://github.com/github/markup just yet. I'm not going to add one but if someone else wants to, I'll add my support. :) |
@tnm Sure. Here it is. |
Add support for Literate CoffeeScript
✨ ☕ ✨ |
Eh? Don't we need a highlighter for this? Or has someone already got a new one merged into Pygments HEAD? |
IMHO, it should be another issue on github/markup. Not only the whole
could be rendered exactly the same way as:
and render into: Initialize a scope with its parent, for lookups up the chain, as well as a reference to the Block node it belongs to, which is where it should declare its variables, and a reference to the function that it belongs to. constructor: (@parent, @expressions, @method) ->
@variables = [{name: 'arguments', type: 'arguments'}]
@positions = {}
Scope.root = this unless @parent Obviously another pull request should be sent to github/markup, so that GitHub can support this. |
I agree with both of you, in a sense. If we can only have one, which is the But if we have a generator for github/markup, even now we should also have This is exciting. I'm confident we can get a good set of tools for this. On 1 March 2013 07:11, Mort Yao notifications@github.com wrote:
|
This blows my mind. GitHub, please add this! :) |
Just took a look at github/markup#162 and found it turns out to be using jm/literati for doing the same thing in Literate Haskell: # Fence it and add it to the output
markdown << "```haskell\n#{current_line}\n```\n" Think Literate CoffeeScript could be very similar, but I can't do that (security needs); |
Awesome -- that's exactly what my hacky https://github.com/jashkenas/journo/blob/master/Cakefile#L9-L15 A quick and dirty version along those lines would be perfect. |
+1 - I'm using .litcoffee for a project and love it. I only miss the correct markup in github. |
Literate Coffee uses both |
As of 1.5.0, CoffeeScript supports code to be written in "literate" mode (as a Markdown document).
http://coffeescript.org/#literate
Just trying to add Literate CoffeeScript to the language list, in the same way Literate Haskell does.