jashkenas / jashkenas/coffee-script-tmbundle

Improper highlighting of multi-line function definitions

Open
#152 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
826
Forks
232
PR merge metrics
No merged PRs in 30d

Description

I'm writing some big coffee files, and as the program is growing in complexity, my function & argument names have become a little longer, thus for readability's sake, i've to break the function declaration line into two or more lines like so:

``` coffee-script
testFunctionWhichBecameLong = (opt_1, opt_2,
opt_3, opt_4) ->
return opt1 * opt2 - opt3 / opt4
```

These kinds of functions are not being highlighted, and thus the function starts to look like an ugly duckling...

Look at this image for more details:
![broken coffee-script bundle](https://f.cloud.github.com/assets/760112/2125112/f7de1f7e-924b-11e3-8ff9-0a6a180a9fdf.png)

Contributor guide

No contributing guide indexed for this repository

Research direction

Reproduce the reported CoffeeScript syntax-highlighting problem with the multiline function definition shown in the issue. Inspect the bundle's CoffeeScript highlighting rules and compare the highlighting of single-line and multiline declarations; done means the function and its arguments are highlighted consistently across the line break.

Written by the indexing model from the issue text.

Assessment

Tech stack
coffeescript
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
Half a day
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.