atom / symbols-view

Jump to symbols in Atom
MIT License
163 stars 114 forks source link

ruby: don't parse contents of HEREDOC strings #223

Open lumean opened 7 years ago

lumean commented 7 years ago

Prerequisites

Description

Ruby syntax in a HEREDOC String is parsed into smybols.

Steps to Reproduce

Example code snipped which results in wrong symbols

class A
  def usage()
    msg = <<HEREDOC
class A
  def lorem
  end
  module ipsum
    extend self
  end
end
   def funny heredoc
   end
HEREDOC
    return msg
  end

  def test()

  end
end

Expected behavior: [What you expect to happen] neither a second class A nor lorem, ipsum or funny should appear in the symbols. There should be just one single class A and two methods usage and test

Actual behavior: [What actually happens] all ruby syntax within a HEREDOC section is parsed.

Reproduces how often: [What percentage of the time does it reproduce?] 100%

Versions

$ atom --version
Atom    : 1.17.2
Electron: 1.3.15
Chrome  : 52.0.2743.82
Node    : 6.5.0
$ apm --version
apm  1.17.0
npm  3.10.5
node 6.9.5 x64
python 2.7.10
git 2.11.0