Skip to content
This repository was archived by the owner on Dec 15, 2022. It is now read-only.
This repository was archived by the owner on Dec 15, 2022. It is now read-only.

Final end does not get highlighted after a block with a rescue inside a method #274

@calebmeyer

Description

@calebmeyer

Prerequisites

Description

Ruby 2.6 added the ability to do a rescue without a corresponding begin inside a block. That means code like

arr.each do |thing|
  begin
    try(thing)
  rescue error
    handle_it
  end
end

can be rewritten a little shorter (omitting the begin, and fixing the indentation):

arr.each do |thing|
  try(thing)
rescue error
  handle_it
end

Steps to Reproduce

  1. Put a block like the above into a method

Expected behavior:
All end tags are syntax highlighted

Actual behavior:
The method's end tag loses highlighting:
image

Reproduces how often:
100% of the time

Versions

atom --version

Atom    : 1.40.0
Electron: 3.1.10
Chrome  : 66.0.3359.181
Node    : 10.2.0

apm --version
apm  2.4.2
npm  6.2.0
node 10.2.1 x64
atom 1.40.0
python 3.7.2
git 2.16.2.windows.1
visual studio

OS: Windows 10 Enterprise (1809)

Additional Information

None at this time

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions