hmatsuda / ruby-block

highlight matching ruby block on Atom editor
https://atom.io/packages/ruby-block
GNU General Public License v2.0
16 stars 11 forks source link

[23] fix detection of if and begin blocks when assigned #31

Closed vyncem closed 5 years ago

vyncem commented 7 years ago

Fix: https://github.com/hmatsuda/ruby-block/issues/23

vyncem commented 6 years ago

Hey @hmatsuda, Finally got round to coming back and fixing the specs. Please could you look into merging? Thanks, Vyn

hmatsuda commented 6 years ago

@vyncem Thanks! After applying this patch, below test case highlights wrong line.. Could you check this?

# one line if/unless statement
if true
  return if true
  return unless true
  var = if 1 == 1 ? "Yes" : "No"
  var = unless 1 == 1 ? "Yes" : "No"
end
vyncem commented 6 years ago

Will do. Thanks. 👍

On Sat, Mar 24, 2018, 11:56 Haruhiko Kobayashi notifications@github.com wrote:

@vyncem https://github.com/vyncem Thanks! After applying this patch, below test case highlights wrong line.. Could you check this?

one line if/unless statement

if true return if true return unless true var = if 1 == 1 ? "Yes" : "No" var = unless 1 == 1 ? "Yes" : "No" end

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/hmatsuda/ruby-block/pull/31#issuecomment-375879509, or mute the thread https://github.com/notifications/unsubscribe-auth/ADeRhQl1cVOaYw0JG0sdFp9cm8I979M6ks5thjSGgaJpZM4P41Li .

-- HQ - 76 Lower Baggot Street, Dublin 2, Ireland NYC - 1155 Avenue of the Americas, 7th Floor, New York, NY 10036, USA Hong Kong - Level 25, Central Plaza, 18 Harbour Road, Wan Chai, Hong Kong SAR Sydney - Level 4, 2 Holt Street, Surry Hills, NSW 2010, Australia London - 1 London Bridge Street, London, SE19GF

Storyful powers great storytelling https://www.youtube.com/watch?v=zKOz574TLnU

This e-mail and any attachments are confidential, may be legally privileged and are the property of Storyful Limited on whose systems they were generated. Storyful Limited is registered in Ireland under number 478477, has its registered office at 76 Lower Baggot Street, Dublin 2, Ireland. If you have received this e-mail in error, please notify the sender immediately and do not use, distribute, store or copy it in any way. Statements or opinions in this e-mail or any attachment are those of the author and are not necessarily agreed or authorised by Storyful Limited. Storyful Limited may monitor outgoing or incoming emails as permitted by law. It accepts no liability for viruses introduced by this e-mail or attachments.

vyncem commented 6 years ago

Hey @hmatsuda, I've added a failing spec for that line. I hope to work at understanding the code a bit better then fixing it.

vyncem commented 5 years ago

Stale