Function: hywiki-word-strip-suffix
hywiki-word-strip-suffix is a byte-compiled function defined in
hywiki.el.
Signature
(hywiki-word-strip-suffix WIKIWORD)
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-20260822.1645/hywiki.el
(defun hywiki-word-strip-suffix (wikiword)
"Return PAGE-NAME with any optional #section:Lnum:Cnum stripped off.
If an empty string or not a string, return nil."
(when (and (stringp wikiword) (not (string-empty-p wikiword)))
(setq wikiword (string-trim wikiword "[# \t\n\r]+" "[# \t\n\r]+"))
(if (and (string-match hywiki-word-with-optional-suffix-exact-regexp wikiword)
(or (match-beginning 2) (match-beginning 4)))
;; Remove any #section:Lnum:Cnum suffix in PAGE-NAME.
(match-string-no-properties 1 wikiword)
wikiword)))