atom / language-coffee-script

CoffeeScript support in Atom
Other
59 stars 56 forks source link

Function application in parentheses breaks syntax highlighting #155

Closed nathancarter closed 6 years ago

nathancarter commented 6 years ago

Description

In literate mode, if a function application is inside a parentheses, then syntax highlighting becomes broken as shown below.

Steps to Reproduce

  1. Create a new file.
  2. Save it with the .litcoffee extension.
  3. Enter the code below.

    
    Example comments correctly highlighted
    
    ( foo bar ).baz()

Example comments incorrectly highlighted.



**Expected behavior:** Text without indentation should always be treated and highlighted as Markdown, never mistaken for Coffeescript code.  GitHub highlights it correctly in the code shown above.

**Actual behavior:** The following screenshot shows that the syntax highlighter has begun to treat unindented code as if it were Coffeescript code.

<img width="463" alt="screen shot 2017-10-13 at 10 41 18 am" src="https://user-images.githubusercontent.com/1316622/31551615-1df9e8a4-b003-11e7-9097-876024037291.png">

**Reproduces how often:** 100%

### Versions

Atom    : 1.21.0

Electron: 1.6.9

Chrome  : 56.0.2924.87

Node    : 7.4.0

Mac OS X 10.11.6
nathancarter commented 6 years ago

Not sure if the root cause here is like that of #153 and #154 but they have the same result, so I'm linking them.