From b0e1e23503ab19dbcfeeb2ca53518cbf6f6c5d8e Mon Sep 17 00:00:00 2001 From: bw Date: Sun, 13 Sep 2026 11:23:59 -0400 Subject: [PATCH 1/2] hywiki-word-section-regexp - Fix missing section exclusion chars Fix that character after the '#' section separator cannot be any of these additional characters that were missing: ()<>{}\". This fixes a bug where 'Wiki#' would be highlighted within: ("Wiki#"). --- ChangeLog | 7 +++++++ hywiki.el | 4 ++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index d0d038d1..06bf4184 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2026-09-13 Bob Weiner + +* hywiki.el (hywiki-word-section-regexp): Fix that character after the + '#' section separator cannot be any of these additional characters + that were missing: ()<>{}\". This fixes a bug where 'Wiki#' + would be highlighted within: ("Wiki#"). + 2026-09-12 Mats Lidell * hmouse-drv.el (hkey-help-hbut): Make def lexical var. diff --git a/hywiki.el b/hywiki.el index 47d99351..bc2fb5ef 100644 --- a/hywiki.el +++ b/hywiki.el @@ -3,7 +3,7 @@ ;; Author: Bob Weiner ;; ;; Orig-Date: 21-Apr-24 at 22:41:13 -;; Last-Mod: 11-Sep-26 at 10:58:58 by Bob Weiner +;; Last-Mod: 13-Sep-26 at 11:21:07 by Bob Weiner ;; ;; SPDX-License-Identifier: GPL-3.0-or-later ;; @@ -541,7 +541,7 @@ Nil by default." Do not use a start or end line/string anchor in this regexp.") (defconst hywiki-word-section-regexp - "\\(#[^][# \t\n\r\f]+\\)" + "\\(#[^][#()<>{}\" \t\n\r\f]+\\)" "Regexp that matches a non-delimited HyWikiWord #section extension. After the first # character, this may contain any non-square-bracket, non-# and non-whitespace characters.") From dc6e2ff741fcefe803df98d7b458e2556991a7c6 Mon Sep 17 00:00:00 2001 From: bw Date: Sun, 13 Sep 2026 11:27:52 -0400 Subject: [PATCH 2/2] hywiki-tests--wikiword-identified-in-emacs-lisp-mode - "WikiWord#" --- ChangeLog | 2 ++ test/hywiki-tests.el | 6 ++---- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 06bf4184..d8828a7e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -4,6 +4,8 @@ '#' section separator cannot be any of these additional characters that were missing: ()<>{}\". This fixes a bug where 'Wiki#' would be highlighted within: ("Wiki#"). + test/hywiki-tests.el (hywiki-tests--wikiword-identified-in-emacs-lisp-mode): + Add back previously failing test for "WikiWord#". 2026-09-12 Mats Lidell diff --git a/test/hywiki-tests.el b/test/hywiki-tests.el index 5a149ac0..80e292f4 100644 --- a/test/hywiki-tests.el +++ b/test/hywiki-tests.el @@ -3,7 +3,7 @@ ;; Author: Mats Lidell ;; ;; Orig-Date: 18-May-24 at 23:59:48 -;; Last-Mod: 30-Aug-26 at 23:15:25 by Bob Weiner +;; Last-Mod: 13-Sep-26 at 11:26:36 by Bob Weiner ;; ;; SPDX-License-Identifier: GPL-3.0-or-later ;; @@ -1808,9 +1808,7 @@ face is verified during the change." (should (string= "WikiWord" (hywiki-tests--word-at))))) ;; Does not highlight as a WikiWord - ;; FIXME: "WikiWord#" (with no ending space) replaced below with - ;; version with an extra space for a passing test. - (dolist (v '("WikiWord# " "[[WikiWord]]" "<>" + (dolist (v '("WikiWord#" "WikiWord# " "[[WikiWord]]" "<>" "{[[WikiWord]]}" "([[WikiWord]])")) (erase-buffer) (hywiki-tests--insert (setq str (format ";; %s" v)))