~emersion/public-inbox

go-sieve: Fix tokenization of numbers v1 APPLIED

Andy Balholm: 1
 Fix tokenization of numbers

 1 files changed, 1 insertions(+), 1 deletions(-)
Pushed, thank you!
Export patchset (mbox)
How do I use this?

Copy & paste the following snippet into your terminal to import this patchset into git:

curl -s https://lists.sr.ht/~emersion/public-inbox/patches/55189/mbox | git am -3
Learn more about email & git

[PATCH go-sieve] Fix tokenization of numbers Export this patch

---
 tokenizer.go | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tokenizer.go b/tokenizer.go
index 406225a..d1aded6 100644
--- a/tokenizer.go
+++ b/tokenizer.go
@@ -226,7 +226,7 @@ func (t *tokenizer) number() string {
			break
		}

		if !isAlpha(c) {
		if !isDigit(c) {
			if sb.Len() > 0 && isQuantifier(c) {
				sb.WriteByte(c)
			} else {
-- 
2.46.2
Currently, numbers always give a syntax error, because the tokenizer is 
expecting them to be made up of letters.

Andy