1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
|
Description: Fontify multiline strings.
Bug: http://bugs.debian.org/466130
Author: Jens Peter Secher <jps@debian.org>
Match multiline strings. Regular expressions, however, are not
expressive enough to only match begin and end markers with the same
number of equal signs in them. In other words, the regular expression
below will match syntaktically wrong multiline strings.
Index: lua-mode/lua-mode.el
===================================================================
--- lua-mode.orig/lua-mode.el 2009-08-30 20:46:49.000000000 +0200
+++ lua-mode/lua-mode.el 2009-08-30 22:50:15.000000000 +0200
@@ -220,6 +220,10 @@
`("\\(?:^\\|[^-]\\)\\(--\\[\\(=*\\)\\[\\(?:.\\|\n\\)*?\\]\\2\\]\\)"
(1 font-lock-comment-face t))
+ ;; Multi-line string literals.
+ '("[^-]\\[=*\\[\\(\\([^]]\\|][^]]\\|]=+[^]]\\)*?\\)]=*]"
+ (1 font-lock-string-face t))
+
;;
;; Keywords.
;; (concat "\\<"
|