Open ioistired opened 3 years ago
Probably a bit late, but here's a solution:
#
should not be followed by a {
and there should be at least one blank before #
.normal
(white)diff --git a/elixir.nanorc b/elixir.nanorc
--- a/elixir.nanorc
+++ b/elixir.nanorc
@@ -29,16 +29,16 @@ color brightmagenta "~[a-z]\/([^\/])*\/[a-z]*" "~[a-z]\|([^\|])*\|[a-z]*" "~[a-z
## Strings, double-quoted
color green ""([^"]|(\\"))*""
-## Expression substitution. These go inside double-quoted strings,
-## "like #{this}".
-color brightgreen "#\{[^}]*\}"
-
## Strings, single-quoted
color green "'([^']|(\\'))*'"
+## Expression substitution. These go inside double-quoted strings,
+## "like #{this}".
+color normal "#\{[^}]*\}"
+
## Comments
-color cyan "#.*$" "#$"
-color brightcyan "##.*$" "##$"
+color cyan "(^|[[:space:]])#([^{].*|)$"
+color brightcyan "(^|[[:space:]])##.*$"
As is, string interpolation is not being highlighted at all:
Putting the comment definition before the strings definition helps, but it still treats the rest of the line, after the
#{}
, as a comment:What to do?