branch: externals/hyperbole commit 1df728ec81857140d67b6cc0ee0c16e40f712906 Author: Bob Weiner <r...@gnu.org> Commit: Bob Weiner <r...@gnu.org>
Fix anchored hpath recognition when followed by an opening pair char --- ChangeLog | 6 ++++++ hpath.el | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index f3c61ea9aa..f5fdf1595c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2023-07-05 Bob Weiner <r...@gnu.org> + +* hpath.el (hpath:markdown-section-pattern, hpath:outline-section-pattern): Fix + to allow for opening pair chars after matching anchor (previously had to be a + :punct: character only). + 2023-07-04 Bob Weiner <r...@gnu.org> * hyperbole.el (hyperb:init): Activate 'vertico-mouse-mode' when diff --git a/hpath.el b/hpath.el index 55da0c140f..e79fd29d59 100644 --- a/hpath.el +++ b/hpath.el @@ -660,14 +660,14 @@ Contains a %s for replacement of a specific anchor id.") "Regexp matching a Markdown anchor id definition. Contains a %s for replacement of a specific anchor id.") -(defconst hpath:markdown-section-pattern "^[ \t]*\\(#+\\|\\*+\\)[ \t]+%s\\([ \t[:punct:]]*\\)$" +(defconst hpath:markdown-section-pattern "^[ \t]*\\(#+\\|\\*+\\)[ \t]+%s\\([\[<\({ \t[:punct:]]*\\)$" "Regexp matching a Markdown section header. Contains a %s for replacement of a specific section name.") (defconst hpath:markdown-suffix-regexp "\\.[mM][dD]" "Regexp that matches to a Markdown file suffix.") -(defconst hpath:outline-section-pattern "^\\*+[ \t]+%s[ \t]*\\([:punct:]+\\|$\\)" +(defconst hpath:outline-section-pattern "^\\*+[ \t]+%s[ \t]*\\([\[<\({[:punct:]]+\\|$\\)" "Bol-anchored, no leading spaces regexp matching an Emacs outline section header. Contains a %s for replacement of a specific section name.")