This is an automated email from the ASF dual-hosted git repository.
paulk-asert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/groovy.git
The following commit(s) were added to refs/heads/master by this push:
new e42da49d7f minor refactor: invalid block comment nanorc spec
e42da49d7f is described below
commit e42da49d7fd6de5b663c566c771e5ada0c12543c
Author: Paul King <[email protected]>
AuthorDate: Mon May 18 20:22:15 2026 +1000
minor refactor: invalid block comment nanorc spec
---
.../groovy-groovysh/src/main/resources/nanorc/markdown.nanorc | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git
a/subprojects/groovy-groovysh/src/main/resources/nanorc/markdown.nanorc
b/subprojects/groovy-groovysh/src/main/resources/nanorc/markdown.nanorc
index 7a4c97af58..0924cdc0ab 100644
--- a/subprojects/groovy-groovysh/src/main/resources/nanorc/markdown.nanorc
+++ b/subprojects/groovy-groovysh/src/main/resources/nanorc/markdown.nanorc
@@ -30,6 +30,14 @@ SECTION: "^[=\-]+[[:space:]]*$"
# ATX headings: # H1 through ###### H6
TITLE: "^#{1,6}[[:space:]].*$"
+# Fenced code blocks: ```lang ... ``` (and ~~~ fences). Declared before
+# the inline rules below so the multi-line span wins over the emphasis,
+# inline-code and link patterns that would otherwise color inside it.
+# Symmetric start/end is valid for a highlight rule (the start==end
+# rejection only applies to the $BLOCK_COMMENT directive).
+STRING: start="```" end="```"
+STRING: start="~~~" end="~~~"
+
# Emphasis (italic): *text* or _text_
VARIABLE: "(\*[^*]+\*)" "(_[^_]+_)"
@@ -51,6 +59,3 @@ LINK: "\<https?://[^[:space:])>]+"
# GFM tables (lines bracketed by |)
ATTRIBUTE: "^[[:space:]]*\|.*\|[[:space:]]*$"
-
-# Fenced code blocks (triple backticks)
-$BLOCK_COMMENT: "```, ```"