Improve squiggly heredoc support in non-SMIE Ruby mode
* lisp/progmodes/ruby-mode.el (ruby-parse-partial): Support squiggly heredocs here, too (port from upstream).
This commit is contained in:
parent
9d5ccebeba
commit
973ce5a123
1 changed files with 1 additions and 1 deletions
|
@ -1151,7 +1151,7 @@ delimiter."
|
|||
((looking-at "<<")
|
||||
(cond
|
||||
((and (ruby-expr-beg 'heredoc)
|
||||
(looking-at "<<\\(-\\)?\\(\\([\"'`]\\)\\([^\n]+?\\)\\3\\|\\(?:\\sw\\|\\s_\\)+\\)"))
|
||||
(looking-at "<<\\([-~]\\)?\\(\\([\"'`]\\)\\([^\n]+?\\)\\3\\|\\(?:\\sw\\|\\s_\\)+\\)"))
|
||||
(setq re (regexp-quote (or (match-string 4) (match-string 2))))
|
||||
(if (match-beginning 1) (setq re (concat "\\s *" re)))
|
||||
(let* ((id-end (goto-char (match-end 0)))
|
||||
|
|
Loading…
Add table
Reference in a new issue