Project

General

Profile

Actions

Bug #5024

closed

Feature #5142: Remove ruby-mode.el from ruby's repo

ruby-mode.el syntax highlighting breaks on regular expression with quotes

Added by slickrobert (Robert Smith) almost 13 years ago. Updated over 11 years ago.

Status:
Third Party's Issue
Target version:
ruby -v:
1.9.2-p180 revision 30909
Backport:
[ruby-core:38045]

Description

I am using 1.9.2-p160 revision 29036

If there are an odd number of quotation marks inside a regular expression, the syntax highlighting breaks, continuing the regular expression color until another quotation mark is found.

method /^"([^"]*)"$/ do |arg|

continues regular expression syntax color until quotation is matched

Syntax continues to work correctly with parentheses around the method, such as
method(/^"([^"]*)"$/) do |arg|

Searching led me to a related bug that was fixed: http://redmine.ruby-lang.org/issues/show/4242


Related issues 1 (0 open1 closed)

Related to Ruby master - Feature #6823: Where/how should ruby-mode issues be reported?Closedmatz (Yukihiro Matsumoto)Actions

Updated by slickrobert (Robert Smith) almost 13 years ago

Sorry, I meant revision 30909 in the description.

Updated by naruse (Yui NARUSE) almost 13 years ago

  • Status changed from Open to Assigned
  • Assignee set to nobu (Nobuyoshi Nakada)
Actions #3

Updated by naruse (Yui NARUSE) over 12 years ago

  • Parent task set to #5142

Updated by dgutov (Dmitry Gutov) over 11 years ago

This is kinda-fixed in the Emacs trunk, provided that "method" is one of the names in the list ruby-syntax-methods-before-regexp.
Otherwise, the whole regexp literal isn't recognized in the first example. It should be obvious, the string-like highlighting would only start after the " character.

Updated by nobu (Nobuyoshi Nakada) over 11 years ago

  • Category set to misc
  • Status changed from Assigned to Third Party's Issue
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0