[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/adoc-mode 3ba0822b91 028/199: bugfix: quotes shall not cro
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/adoc-mode 3ba0822b91 028/199: bugfix: quotes shall not cross labeled list item boundaries |
Date: |
Sun, 3 Sep 2023 06:59:22 -0400 (EDT) |
branch: elpa/adoc-mode
commit 3ba0822b91fa6270964acb33f15f04f0ae73958a
Author: Florian Kaufmann <sensorflo@gmail.com>
Commit: Florian Kaufmann <sensorflo@gmail.com>
bugfix: quotes shall not cross labeled list item boundaries
---
adoc-mode-test.el | 20 +++++++++-----------
adoc-mode.el | 7 ++++++-
2 files changed, 15 insertions(+), 12 deletions(-)
diff --git a/adoc-mode-test.el b/adoc-mode-test.el
index e2d4b992d0..753c729d34 100644
--- a/adoc-mode-test.el
+++ b/adoc-mode-test.el
@@ -240,20 +240,18 @@
"lorem " 'no-face "**" markup-meta-hide-face " ipsum " markup-strong-face
"**" markup-meta-hide-face "\n" nil
"\n" nil
- ;; 1) don't cross list item boundaries
- ;; 2) don't mistake a list item '**' as an unconstrained quote '**' (either
start or end)
+ ;; don't cross list item boundaries
"-" markup-list-face " " nil "lorem ** ipsum\n" 'no-face
"-" markup-list-face " " nil "dolor ** sit\n" 'no-face
- "**" markup-list-face " " nil "lorem ** ipsumt\n" 'no-face
+ ;; test that a quote within the list element works
+ "-" markup-list-face " " nil "dolor " 'no-face "**" markup-meta-hide-face "
sit " markup-strong-face "**" markup-meta-hide-face "\n" nil
+ ;; dont mistake '**' list elements for quote starters/enders
+ "**" markup-list-face " " nil "lorem ** ipsum\n" 'no-face
"**" markup-list-face " " nil "dolor ** sit\n" 'no-face
-
- ;; todo: not reaching into a labeled list item text does no yet work
- ;; "lorem ** ipsum " markup-gen-face "::" markup-list-face " " nil "sit **
dolor\n" 'no-face
-
- ;; test also
- ;; - over beginning of labeled
-
- ))
+ "**" markup-list-face " " nil "dolor ** sit\n" 'no-face
+ ;; don't cross list item boundaries in the case of labeled lists
+ "lorem ** ipsum " markup-gen-face "::" markup-list-face " " nil "sit **
dolor\n" 'no-face
+ "lorem ** ipsum " markup-gen-face "::" markup-list-face " " nil "sit **
dolor\n" 'no-face))
;; todo: also test for warnings
(ert-deftest adoctest-test-byte-compile ()
diff --git a/adoc-mode.el b/adoc-mode.el
index 6c54bee868..5a74af9182 100644
--- a/adoc-mode.el
+++ b/adoc-mode.el
@@ -902,7 +902,12 @@ Concerning TYPE, LEVEL and SUB-TYPE see `adoc-re-oulisti'"
"Creates a keyword for font-lock which highlights labeled list item.
Concerning TYPE, LEVEL and SUB-TYPE see `adoc-re-llisti'."
(list
- `(lambda (end) (adoc-kwf-std end ,(adoc-re-llisti sub-type level) '(0)))
+ `(lambda (end)
+ (when (adoc-kwf-std end ,(adoc-re-llisti sub-type level) '(0))
+ (let ((pos (match-beginning 0)))
+ (when (> pos (point-min))
+ (put-text-property (1- pos) pos 'adoc-reserved 'block-del)))
+ t))
'(1 '(face nil adoc-reserved block-del) t)
'(2 markup-gen-face t)
'(3 '(face adoc-align adoc-reserved block-del) t)
- [nongnu] elpa/adoc-mode b0d75800d0 012/199: edited comment, (continued)
- [nongnu] elpa/adoc-mode b0d75800d0 012/199: edited comment, ELPA Syncer, 2023/09/03
- [nongnu] elpa/adoc-mode af7cd59e1b 013/199: added first-whites-fixed-width, ELPA Syncer, 2023/09/03
- [nongnu] elpa/adoc-mode 5421059e54 015/199: small change in regexp for unconstrained quote, ELPA Syncer, 2023/09/03
- [nongnu] elpa/adoc-mode 879f594ac9 017/199: comment change / removed a few unneeded adoc face variables, ELPA Syncer, 2023/09/03
- [nongnu] elpa/adoc-mode 6cb365085b 018/199: removed/abandoned lexxer stuff, ELPA Syncer, 2023/09/03
- [nongnu] elpa/adoc-mode 2a088d1e83 020/199: added meta-face-cleanup, initial version, ELPA Syncer, 2023/09/03
- [nongnu] elpa/adoc-mode eb20a274e0 024/199: made it easier to run tests, ELPA Syncer, 2023/09/03
- [nongnu] elpa/adoc-mode de18a17505 031/199: fl keyword for comments now in new-style, ELPA Syncer, 2023/09/03
- [nongnu] elpa/adoc-mode 8349f0e05e 032/199: added better support for attribute lists, no tests written yet, ELPA Syncer, 2023/09/03
- [nongnu] elpa/adoc-mode c8b39080f8 025/199: added that inline subst can't match across block boundaries, ELPA Syncer, 2023/09/03
- [nongnu] elpa/adoc-mode 3ba0822b91 028/199: bugfix: quotes shall not cross labeled list item boundaries,
ELPA Syncer <=
- [nongnu] elpa/adoc-mode 2da645a750 040/199: attribute-list can have a local face alist / two faces for target of an inline macro can be specified, ELPA Syncer, 2023/09/03
- [nongnu] elpa/adoc-mode 69e44f37ac 049/199: changed default of adoc-insert-replacement to nil, ELPA Syncer, 2023/09/03
- [nongnu] elpa/adoc-mode a16699bffe 050/199: test: adapted to new ert, ELPA Syncer, 2023/09/03
- [nongnu] elpa/adoc-mode 6b84d70fe0 051/199: test: reworked adoctest-faces, ELPA Syncer, 2023/09/03
- [nongnu] elpa/adoc-mode a88d4ea5d5 052/199: bugfix: some regexps did not handle end of buffer correctly, ELPA Syncer, 2023/09/03
- [nongnu] elpa/adoc-mode f1477f70cc 057/199: comment changes, ELPA Syncer, 2023/09/03
- [nongnu] elpa/adoc-mode 601de95b01 062/199: modified regexp for xref for better find, ELPA Syncer, 2023/09/03
- [nongnu] elpa/adoc-mode b79c243241 059/199: adoc-re-anchor can now match a given id, ELPA Syncer, 2023/09/03
- [nongnu] elpa/adoc-mode 9753b42821 065/199: bumped version to V0.5.0, ELPA Syncer, 2023/09/03
- [nongnu] elpa/adoc-mode 3501940311 073/199: test: running the test is a bit more smoothly, ELPA Syncer, 2023/09/03