On 2024/08/08 19:08, Clemens Feige wrote:
>
> Hello
>
> The patch works well. Great! Thanks, Jun.
> Using `reverse=True` inside `prepare_regexp` seems to cure the issue.
>
> SVN-blame tells us: The affected line 38 in tracwikiextras/util.py has
> been recently edited in 2022 with the objective to make this plug-in
> compatible with Python 3.
Hum, before [18475], the prepare_regexp sorts longer symbols before
shorter ones.
[[[
def prepare_regexp(d):
- syms = d.keys()
- syms.sort(lambda a, b: cmp(len(b), len(a)))
+ syms = sorted(d.keys(), key=lambda a: len(a))
return "|".join([r'%s%s%s'
% (r'\b' if re.match(r'\w', s[0]) else '',
re.escape(s),
]]]
> How shall we continue? If desired I can still create a ticket for the
> maintainer of the plug-in and append Jun's patch. Or the maintainer or
> somebody else with write permissions commits the change ...
Could you please add a comment to https://trac-hacks.org/ticket/14133 or
create new ticket about this issue?
I have commit right to the entire of trac-hacks. I'll push the changes
and re-close the ticket.
--
Jun Omae <[email protected]> (大前 潤)
--
You received this message because you are subscribed to the Google Groups "Trac
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/trac-users/12345321-d877-4463-942b-cb0f05a7f241%40gmail.com.