Function: hywiki-word-strip-suffix
hywiki-word-strip-suffix is a byte-compiled function defined in
hywiki.el.
Signature
(hywiki-word-strip-suffix PAGE-NAME)
Documentation
Return PAGE-NAME with any optional #section:Lnum:Cnum stripped off.
If an empty string or not a string, return nil.
Source Code
;; Defined in ~/.emacs.d/elpa/hyperbole-20260414.325/hywiki.el
(defun hywiki-word-strip-suffix (page-name)
"Return PAGE-NAME with any optional #section:Lnum:Cnum stripped off.
If an empty string or not a string, return nil."
(when (and (stringp page-name) (not (string-empty-p page-name)))
(setq page-name (string-trim page-name "[# \t\n\r]+" "[# \t\n\r]+"))
(if (and (string-match hywiki-word-with-optional-suffix-exact-regexp page-name)
(or (match-beginning 2) (match-beginning 4)))
;; Remove any #section:Lnum:Cnum suffix in PAGE-NAME.
(match-string-no-properties 1 page-name)
page-name)))