From 497f6c19992f37c86e84508ce2b5156fc4bbeb35 Mon Sep 17 00:00:00 2001 From: Tobias Zawada Date: Mon, 31 Jul 2023 17:09:46 +0200 Subject: [PATCH] Addresses #39. `source-language` is only a document attribute. Add comment with adoc manual reference. --- adoc-mode.el | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/adoc-mode.el b/adoc-mode.el index a58f392..2feaa4b 100644 --- a/adoc-mode.el +++ b/adoc-mode.el @@ -2040,7 +2040,11 @@ START-SRC and END-SRC delimit the actual source code." (outer-brackets-and-delimiter (&rest stuff) (format "^\\[%s\\]\n\\(?2:----+\\)\n" (apply #'concat stuff))) - (lang () ",[\t ]*\\(source-language[\t ]*=[\t ]*\\)?\\(?1:[^],]+\\)") + ;; The language attribute is positional only (2nd slot). + ;; It gets its default value from the document attribute `source-language`. + ;; The leading space between the comma and the 2nd attribute is ignored. + ;; See https://docs.asciidoctor.org/asciidoc/latest/attributes/element-attributes/#attribute-list. + (lang () ",[\t ]*\\(?1:[^],]+\\)") (optional-other-args () "\\(?:,[^]]+\\)?")) (outer-brackets-and-delimiter (rx-or