Closed graceful-potato closed 4 years ago
Also this regexp has some disadvantages with multi-line expression.
If you want to write division and put divisor on the new line then you have to use a whitespace after /
. Whithout whitespace this expression will be highlighted as regexp.
# without whitespace after `/`
# `/` will be highlighted as start of regexp
4 /
2
# with whitespace after `/`
# expression will be highlighted as division
4 /
2
If you want to write multi-line regexp then you have to make sure that there isn't a single character after /
# with whitespace after `/`
# expression will not be highlighted as multi-line regex
regexp = /
foo
bar
/
# with any other character after `/`
# expression will not be highlighted as multi-line regex
regexp = /f
oo
bar
/
# without any character after `/`
# expression will be highlighted as multi-line regex
regexp = /
foo
bar
/
Github highlighting has exactly the same issues. UPDATE Same issues only in preview mode
Well, according to issue atom/language-ruby#82 this regexp will bring in new highlighting problems.
Potential solution for #117