Why does the unl regex exclude closing parentheses?

15 views
Skip to first unread message

Thomas Passin

unread,
May 5, 2023, 1:53:17 PM5/5/23
to leo-editor
The unl regex excludes the ")" character:

unl_regex = re.compile(r"""\bunl:[^`'")]+""")

Why is that?  It would not be unusual to have a node whose headline includes one.  For instance:  regex (test2)

Currently a node whose headline includes the character cannot be found by Leo's unl: handler.  I would like to remove this restriction unless there is a good reason for it.  (The regex is in leoGlobals.py).

Edward K. Ream

unread,
May 5, 2023, 6:03:24 PM5/5/23
to leo-e...@googlegroups.com
On Fri, May 5, 2023 at 12:53 PM Thomas Passin <tbp1...@gmail.com> wrote:
The unl regex excludes the ")" character:

unl_regex = re.compile(r"""\bunl:[^`'")]+""")

Why is that? 

Probably because I made a mistake :-)  Please feel free to create a new issue. The PR will have to wait until the next release.

Edward
Reply all
Reply to author
Forward
0 new messages