branch: elpa/adoc-mode
commit 497f6c19992f37c86e84508ce2b5156fc4bbeb35
Author: Tobias Zawada <t...@esi-group.com>
Commit: TobiasZawada <i...@tn-home.de>

    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 a58f3926cb..2feaa4b234 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

Reply via email to