[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/adoc-mode 0ac95247d4 116/199: refactoring so regexp's for
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/adoc-mode 0ac95247d4 116/199: refactoring so regexp's for one- and two line titles have group 2 for title's text |
Date: |
Sun, 3 Sep 2023 06:59:39 -0400 (EDT) |
branch: elpa/adoc-mode
commit 0ac95247d4809c6aef544f0b1907efa9ad883b60
Author: sensorflo <sensorflo@gmail.com>
Commit: sensorflo <sensorflo@gmail.com>
refactoring so regexp's for one- and two line titles have group 2 for
title's text
---
adoc-mode.el | 17 ++++++++++-------
1 file changed, 10 insertions(+), 7 deletions(-)
diff --git a/adoc-mode.el b/adoc-mode.el
index bb761ed8cb..46ca7c2324 100644
--- a/adoc-mode.el
+++ b/adoc-mode.el
@@ -755,15 +755,18 @@ has the correct length.
DEL is described in `adoc-re-two-line-title-undlerline'.
match-data has these sub groups:
-1 title's text
-2 delimiter
+
+1 dummy, so that group 2 is the title's text as in
+ adoc-re-one-line-title
+2 title's text
+3 delimiter
0 only chars that belong to the title block element"
(when (not (eq (length del) 2))
(error "two line title delimiters must be 2 chars long"))
(concat
;; 1st line: title text must contain at least one \w character, see
;; asciidoc src, Title.parse,
- "\\(^.*?[a-zA-Z0-9_].*?\\)[ \t]*\n"
+ "\\(\\)\\(^.*?[a-zA-Z0-9_].*?\\)[ \t]*\n"
;; 2nd line: underline
(adoc-re-two-line-title-undlerline del)))
@@ -1435,13 +1438,13 @@ text having adoc-reserved set to 'block-del."
`(lambda (end)
(and adoc-enable-two-line-title
(re-search-forward ,(adoc-re-two-line-title del) end t)
- (< (abs (- (length (match-string 1)) (length (match-string 2)))) 3)
+ (< (abs (- (length (match-string 2)) (length (match-string 3)))) 3)
(or (not (numberp adoc-enable-two-line-title))
(not (equal adoc-enable-two-line-title (length (match-string
2)))))
(not (text-property-not-all (match-beginning 0) (match-end 0)
'adoc-reserved nil))))
;; highlighers
- `(1 ,text-face t)
- `(2 '(face markup-meta-hide-face adoc-reserved block-del) t)))
+ `(2 ,text-face t)
+ `(3 '(face markup-meta-hide-face adoc-reserved block-del) t)))
;; (defun adoc-?????-attributes (endpos enddelchar)
;; (list
@@ -2738,7 +2741,7 @@ trailing delimiter ('== my title ==').
(beginning-of-line)
(looking-at (adoc-re-two-line-title (nth level
adoc-two-line-title-del)))))
(setq type 2)
- (setq text (match-string 1))
+ (setq text (match-string 2))
(setq found t))
(t
(setq level (+ level 1)))))
- [nongnu] elpa/adoc-mode a0ddf0f02d 034/199: added tests for images, (continued)
- [nongnu] elpa/adoc-mode a0ddf0f02d 034/199: added tests for images, ELPA Syncer, 2023/09/03
- [nongnu] elpa/adoc-mode 1a4e93ec7c 035/199: enhanded general block macro incl. tests, ELPA Syncer, 2023/09/03
- [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 <=
- [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, 2023/09/03
- [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