chiark / gitweb /
Editor: fix handling of abutting scan matches.
authorSimon Tatham <anakin@pobox.com>
Fri, 5 Jan 2024 22:26:37 +0000 (22:26 +0000)
committerSimon Tatham <anakin@pobox.com>
Fri, 5 Jan 2024 22:26:37 +0000 (22:26 +0000)
commit9bdc99f8991d09b120c549c847a0a83d5b2267e3
treedd5b483819e2cdf6fc172f5f00e080a19fac5446
parent932002c2e116cce569c3cf48c72be605b5e6fb83
Editor: fix handling of abutting scan matches.

My example test of '#hashtag@mention' _shouldn't_ have highlighted the
mention, because the word character before the @ disqualifies it. But
I was doing the matching on a slice of the string, instead of giving
get_span the whole string and telling it where to start from.

That in turn was because I hadn't bothered to give get_span that
argument. But it's really easy to add! Now done.
src/editor.rs
src/scan_re.rs