Skip to content

Commit

Permalink
Addresses #39. source-language is only a document attribute. Add co…
Browse files Browse the repository at this point in the history
…mment with adoc manual reference.
  • Loading branch information
Tobias Zawada authored and TobiasZawada committed Aug 3, 2023
1 parent 2cc5aab commit 497f6c1
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion adoc-mode.el
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 497f6c1

Please sign in to comment.