[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/adoc-mode 69569ee920 105/199: improved fontifying for foot
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/adoc-mode 69569ee920 105/199: improved fontifying for footnoteref |
Date: |
Sun, 3 Sep 2023 06:59:38 -0400 (EDT) |
branch: elpa/adoc-mode
commit 69569ee920fd785f8906690efe3590d41b758086
Author: sensorflo <sensorflo@gmail.com>
Commit: sensorflo <sensorflo@gmail.com>
improved fontifying for footnoteref
---
adoc-mode-test.el | 31 +++++++++++++++++++++++++++++++
adoc-mode.el | 17 +++--------------
2 files changed, 34 insertions(+), 14 deletions(-)
diff --git a/adoc-mode-test.el b/adoc-mode-test.el
index b412a913fa..2fd651fe85 100644
--- a/adoc-mode-test.el
+++ b/adoc-mode-test.el
@@ -309,6 +309,37 @@ removed before TRANSFORM is evaluated.
"]" markup-meta-face "\n" nil
))
+(ert-deftest adoctest-test-footnoterefs ()
+ (adoctest-faces "footnoterefs"
+ ;; simple example
+ "footnoteref" markup-command-face ":" markup-meta-face
+ "[" markup-meta-face
+ "myid" markup-anchor-face
+ "]" markup-meta-face "\n" nil
+
+ "footnoteref" markup-command-face ":" markup-meta-face
+ "[" markup-meta-face
+ "myid" markup-anchor-face
+ "," markup-meta-face
+ "lorem ipsum" markup-secondary-text-face
+ "]" markup-meta-face "\n" nil
+
+ ;; footnoteref can be hard up against the preceding word
+ "lorem" 'no-face
+ "footnoteref" markup-command-face ":" markup-meta-face
+ "[" markup-meta-face
+ "myid" markup-anchor-face
+ "]" markup-meta-face "\n" nil
+
+ "lorem" 'no-face
+ "footnoteref" markup-command-face ":" markup-meta-face
+ "[" markup-meta-face
+ "myid" markup-anchor-face
+ "," markup-meta-face
+ "lorem ipsum" markup-secondary-text-face
+ "]" markup-meta-face "\n" nil
+ ))
+
(ert-deftest adoctest-test-images ()
(adoctest-faces "images"
;; block macros
diff --git a/adoc-mode.el b/adoc-mode.el
index 575606451b..390ddc836a 100644
--- a/adoc-mode.el
+++ b/adoc-mode.el
@@ -463,7 +463,8 @@ To become a customizable variable when regexps for list
items become customizabl
("alt" . markup-secondary-text-face)
("title" . markup-secondary-text-face)
("attribution" . markup-secondary-text-face)
- ("citetitle" . markup-secondary-text-face))
+ ("citetitle" . markup-secondary-text-face)
+ ("text" . markup-secondary-text-face))
"An alist, key=attribute id, value=face.")
(defvar adoc-mode-abbrev-table nil
@@ -2024,19 +2025,7 @@ meta characters."
(adoc-kw-inline-macro "xref" nil nil '(markup-reference-face
markup-internal-reference-face) t
'(("caption") (("caption" . markup-reference-face))))
(adoc-kw-inline-macro "footnote" t nil nil nil 'entire-attribute-list)
- (list
"\\(\\bfootnoteref:\\)\\(\\[\\)\\(.*?\\)\\(,\\)\\(.*?\\(?:\n.*?\\)?\\)\\(\\]\\)"
- '(1 adoc-delimiter) ; name
- '(2 adoc-hide-delimiter) ; [
- '(3 adoc-anchor) ; anchor-id
- '(4 adoc-hide-delimiter) ; ,
- '(5 adoc-secondary-text) ; footnote text
- '(6 adoc-hide-delimiter)) ; ]
- (list "\\(\\bfootnoteref:\\)\\(\\[\\)\\([^,\n].*?\\(?:\n.*?\\)?\\)\\(\\]\\)"
- '(1 adoc-delimiter) ; name
- '(2 adoc-hide-delimiter) ; [
- '(3 adoc-reference) ; reference-id to footnote
- ;; '(3 (adoc-facespec-superscript)) bug: does also fontify the
version having anchor-id
- '(4 adoc-hide-delimiter)) ; ]
+ (adoc-kw-inline-macro "footnoteref" t nil nil nil '("id" "text"))
(adoc-kw-standalone-urls)
;; Macros using default syntax and having default highlighting in adoc-mod
- [nongnu] elpa/adoc-mode fcabdc3a7e 037/199: added general inline macro, began reworking anchors, touched image, (continued)
- [nongnu] elpa/adoc-mode fcabdc3a7e 037/199: added general inline macro, began reworking anchors, touched image, ELPA Syncer, 2023/09/03
- [nongnu] elpa/adoc-mode 656e7670c5 099/199: fixed type: denote -> demote, ELPA Syncer, 2023/09/03
- [nongnu] elpa/adoc-mode 2cfd433622 030/199: extended quotes tests, ELPA Syncer, 2023/09/03
- [nongnu] elpa/adoc-mode a61e7cd749 063/199: added AsciiDoc menu & key map, ELPA Syncer, 2023/09/03
- [nongnu] elpa/adoc-mode 22bd99a194 075/199: test: Use with-temp-buffer instead home-brewed solution, ELPA Syncer, 2023/09/03
- [nongnu] elpa/adoc-mode a3d77b0c15 082/199: bumped copyright year, ELPA Syncer, 2023/09/03
- [nongnu] elpa/adoc-mode a8142043e5 094/199: adoc customization group comment puts more emphasis on that most faces belong to markup-faces, ELPA Syncer, 2023/09/03
- [nongnu] elpa/adoc-mode 1206fe7409 103/199: adoc-re-inline-macro can now also match in the middle of a word, ELPA Syncer, 2023/09/03
- [nongnu] elpa/adoc-mode 0ac95247d4 116/199: refactoring so regexp's for one- and two line titles have group 2 for title's text, ELPA Syncer, 2023/09/03
- [nongnu] elpa/adoc-mode 411eb48ce9 120/199: Sensorflo/pr35 (#3), ELPA Syncer, 2023/09/03
- [nongnu] elpa/adoc-mode 69569ee920 105/199: improved fontifying for footnoteref,
ELPA Syncer <=
- [nongnu] elpa/adoc-mode 6dc82593f0 162/199: Document the mode's history, ELPA Syncer, 2023/09/03
- [nongnu] elpa/adoc-mode 4415af4a53 036/199: fixed typo in identifier, ELPA Syncer, 2023/09/03
- [nongnu] elpa/adoc-mode fdc42c818a 044/199: removed TAGS file, ELPA Syncer, 2023/09/03
- [nongnu] elpa/adoc-mode 47fc7143a3 048/199: test, ELPA Syncer, 2023/09/03
- [nongnu] elpa/adoc-mode 30176c0f3c 054/199: added skelleton for generig promote / denote, ELPA Syncer, 2023/09/03
- [nongnu] elpa/adoc-mode 303019657d 060/199: many things with xref and anchor, ELPA Syncer, 2023/09/03
- [nongnu] elpa/adoc-mode 6cb42436d2 067/199: test: running the test is now more smoothly, ELPA Syncer, 2023/09/03
- [nongnu] elpa/adoc-mode 838684c227 068/199: comment improvements, ELPA Syncer, 2023/09/03
- [nongnu] elpa/adoc-mode 950223b614 070/199: reworked highlighting of urls, ELPA Syncer, 2023/09/03
- [nongnu] elpa/adoc-mode d80b29ebc9 072/199: test: bugfix: point was wronly positioned in adoctest-trans, ELPA Syncer, 2023/09/03