diff --git a/ChangeLog b/ChangeLog index d0d038d1..d8828a7e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +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#"). + test/hywiki-tests.el (hywiki-tests--wikiword-identified-in-emacs-lisp-mode): + Add back previously failing test for "WikiWord#". + 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.") 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)))