Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
2026-09-13 Bob Weiner <rsw@gnu.org>

* 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 <matsl@gnu.org>

* hmouse-drv.el (hkey-help-hbut): Make def lexical var.
Expand Down
4 changes: 2 additions & 2 deletions hywiki.el
Original file line number Diff line number Diff line change
Expand Up @@ -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
;;
Expand Down Expand Up @@ -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.")
Expand Down
6 changes: 2 additions & 4 deletions test/hywiki-tests.el
Original file line number Diff line number Diff line change
Expand Up @@ -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
;;
Expand Down Expand Up @@ -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]]" "<<WikiWord>>"
(dolist (v '("WikiWord#" "WikiWord# " "[[WikiWord]]" "<<WikiWord>>"
"{[[WikiWord]]}" "([[WikiWord]])"))
(erase-buffer)
(hywiki-tests--insert (setq str (format ";; %s" v)))
Expand Down