mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-01-30 04:10:54 -08:00
Support squiggly heredocs in ruby-mode
* lisp/progmodes/ruby-mode.el (ruby-here-doc-beg-re): Support squiggly heredocs added in Ruby 2.3. * test/indent/ruby.rb: Add squiggly example.
This commit is contained in:
parent
4db94245d0
commit
6a9399f7fd
2 changed files with 5 additions and 1 deletions
|
|
@ -102,7 +102,7 @@
|
|||
|
||||
(eval-and-compile
|
||||
(defconst ruby-here-doc-beg-re
|
||||
"\\(<\\)<\\(-\\)?\\(\\([a-zA-Z0-9_]+\\)\\|[\"]\\([^\"]+\\)[\"]\\|[']\\([^']+\\)[']\\)"
|
||||
"\\(<\\)<\\([~-]\\)?\\(\\([a-zA-Z0-9_]+\\)\\|[\"]\\([^\"]+\\)[\"]\\|[']\\([^']+\\)[']\\)"
|
||||
"Regexp to match the beginning of a heredoc.")
|
||||
|
||||
(defconst ruby-expression-expansion-re
|
||||
|
|
|
|||
|
|
@ -4,6 +4,10 @@ if something_wrong? # ruby-move-to-block-skips-heredoc
|
|||
end
|
||||
eowarn
|
||||
foo
|
||||
|
||||
foo(<<~squiggly)
|
||||
end
|
||||
squiggly
|
||||
end
|
||||
|
||||
def foo
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue