branch: elpa/adoc-mode
commit e03d63e0b3d8baeaba995cbc111eff14acd07284
Author: Florian Kaufmann <[email protected]>
Commit: Florian Kaufmann <[email protected]>
extened anchors unittest and fixed revealed bug
---
adoc-mode-test.el | 21 +++++++++++++++------
adoc-mode.el | 9 +++++----
2 files changed, 20 insertions(+), 10 deletions(-)
diff --git a/adoc-mode-test.el b/adoc-mode-test.el
index 31161b9488..fcd84290cb 100644
--- a/adoc-mode-test.el
+++ b/adoc-mode-test.el
@@ -138,18 +138,27 @@
(adoctest-faces "anchors"
;; block id
"[[" markup-meta-face "foo" markup-anchor-face "]]" markup-meta-face "\n"
nil
- "[[" markup-meta-face "foo" markup-anchor-face "," markup-meta-face "bar"
markup-secondary-text-face "]]" markup-meta-face "\n" nil
+ "[[" markup-meta-face "foo" markup-anchor-face "," markup-meta-face
+ "bar" markup-secondary-text-face "]]" markup-meta-face "\n" nil
+
+ ;; special inline syntax: [[id]] [[id,xreftext]]
+ "lorem " 'no-face "[[" markup-meta-face "foo" markup-anchor-face "]]"
+ markup-meta-face "ipsum" 'no-face "\n" nil
+ "lorem " 'no-face "[[" markup-meta-face "foo" markup-anchor-face ","
markup-meta-face
+ "bla bli bla blu" markup-secondary-text-face "]]" markup-meta-face
"ipsum" 'no-face "\n" nil
;; general inline macro syntax
"lorem " 'no-face "anchor" markup-command-face ":" markup-meta-face
- "ipsum" markup-anchor-face
- "[]" markup-meta-face "\n" nil
+ "foo" markup-anchor-face
+ "[]" markup-meta-face "ipsum" 'no-face "\n" nil
"lorem " 'no-face "anchor" markup-command-face ":" markup-meta-face
- "ipsum" markup-anchor-face
- "[" markup-meta-face "dolor sit amet" markup-secondary-text-face"]"
markup-meta-face "\n" nil
+ "foo" markup-anchor-face
+ "[" markup-meta-face "bla bli bla blu" markup-secondary-text-face "]"
markup-meta-face
+ "ipsum" 'no-face "\n" nil
;; biblio
- "[[" markup-meta-face "[X1]" markup-gen-face "]]" markup-meta-face " lorem
ipsum\n" 'no-face
+ "lorem " 'no-face "[[" markup-meta-face "[foo]" markup-gen-face "]]"
markup-meta-face
+ " ipsum\n" 'no-face
))
(ert-deftest adoctest-test-images ()
diff --git a/adoc-mode.el b/adoc-mode.el
index bee03fb92a..01473804fc 100644
--- a/adoc-mode.el
+++ b/adoc-mode.el
@@ -355,12 +355,13 @@ To become a customizable variable when regexps for list
items become customizabl
;; not. And maybe markup-faces splits up markup-secondary-text-face into more
;; specific faces.
(defvar adoc-attribute-face-alist
- '(("caption" . markup-secondary-text-face)
- ("title" . markup-secondary-text-face)
+ '(("id" . markup-anchor-face)
+ ("caption" . markup-secondary-text-face)
+ ("xreflabel" . markup-secondary-text-face)
("alt" . markup-secondary-text-face)
+ ("title" . markup-secondary-text-face)
("attribution" . markup-secondary-text-face)
- ("citetitle" . markup-secondary-text-face)
- ("xreflabel" . markup-secondary-text-face))
+ ("citetitle" . markup-secondary-text-face))
"An alist, key=attribute id, value=face.")
(defvar adoc-mode-hook nil