atom / language-ruby

Ruby package for Atom
Other
101 stars 144 forks source link

Multiline Division Syntax Highlighting #227

Open markpalantoni opened 6 years ago

markpalantoni commented 6 years ago

Description

When the forward slash is used as dividing operator and the expression spans multiple lines, the rest of the statement becomes highlighted as a regular expression. Adding another forward slash stops the incorrect highlighting. Seems like there is a problem with interpreting multiline division statements as regular expressions.

Steps to Reproduce

open new file with Ruby syntax highlighting and type:

a = 2 /
    2

Expected behavior: It syntax highlights as arithmetic like when using multiplication symbol spanning multiple lines.

screen shot 2018-01-12 at 10 38 44 pm

Actual behavior: [What actually happens]

screen shot 2018-01-12 at 10 31 50 pm

Reproduces how often: 100%

Versions

language-ruby 0.71.4

Atom : 1.23.2 Electron: 1.6.15 Chrome : 56.0.2924.87 Node : 7.4.0

OSX 10.10.5