Commit Graph

45 Commits

Author SHA1 Message Date
Jakob Borg 1d823af501 Correctly handle non-ASCII runes in patterns (fixes #54)
When matching a row we calculate an index into the string, and this
index was in runes. However when slicing the string Go uses byte
indexes. This change tracks both, using the rune count to determine the
correct length and the byte index to slice the string.
2022-06-15 10:05:05 +02:00
Sergey Kamardin 19c076cdf2 travis: update go versions 2018-02-09 00:18:42 +03:00
Sergey Kamardin 034ebb20be Avoid btree Index() call on pattern with separators.
To avoid hard Index()'ing of given text with btree matcher we implement
an prefix_any and suffix_any matchers that can work well in many cases.

BTree matcher Index() will be implemented in upcoming commits to prevent
same bugs.

Fixes #23
2018-02-09 00:02:47 +03:00
Sergey Kamardin 51eb1ee00b Merge pull request #17 from shawnps/master
gofmt -s
2017-02-12 23:01:51 +03:00
gobwas 0354991b92 bugfix with row length 2016-10-23 00:02:45 +03:00
Shawn Smith 75853f5901 gofmt -s 2016-08-15 13:02:39 +09:00
gobwas 510a1756cf refactoring 2016-05-30 19:35:53 +03:00
gobwas eabde343bd bugfix, cleaning up 2016-05-14 21:38:00 +03:00
Jakob Borg 347f51cd34 use range constructs that build on Go 1.3 2016-04-03 11:41:14 +02:00
gobwas 04523b0f59 to string tunage 2016-02-25 00:42:26 +03:00
gobwas 803c985a9a cleanup 2016-02-24 23:10:13 +03:00
gobwas 5abd72c544 fixes 2016-02-24 20:23:24 +03:00
gobwas 543f3e714c rename typo 2016-02-24 19:50:04 +03:00
gobwas ee3b8204de use sync.pool 2016-02-24 19:49:44 +03:00
gobwas 0964106bb3 try sync pool 2016-02-24 19:44:33 +03:00
gobwas 6dc0cef691 try use pool with channel 2016-02-24 19:38:05 +03:00
gobwas 34494ea116 Use of constuctors every where, optimizations 2016-02-24 12:36:15 +03:00
gobwas f884dfeb2e t 2016-02-24 11:19:54 +03:00
gobwas 92be27c14d optimizations with cached segments 2016-02-23 14:46:20 +03:00
gobwas 71fc92e3a7 acquire/release segments only when needed 2016-02-23 00:26:06 +03:00
gobwas a1783e9986 try this 2016-02-22 23:47:31 +03:00
gobwas 6e346bf8d5 test parallel 2016-02-22 22:21:13 +03:00
gobwas 4b229a908d remove slices 2016-02-05 17:29:41 +03:00
gobwas 462ce6e3ac remove files 2016-02-05 16:57:54 +03:00
gobwas f843e79707 remove acquire 2016-02-05 16:57:42 +03:00
gobwas ed108ad05a benchmarks 2016-02-05 15:15:36 +03:00
gobwas 6b71a60e74 debug info 2016-02-02 22:34:10 +03:00
gobwas 61a66d485f tune 2016-02-02 22:20:26 +03:00
gobwas 57a5246fac use pool of segments 2016-02-02 22:03:37 +03:00
gobwas 88fcc08f39 progress 2016-02-02 14:57:42 +03:00
s.kamardin dfb03553a2 little bit fixes 2016-01-20 12:47:43 +03:00
s.kamardin b601cfa2a5 add bencharks for indexing 2016-01-18 13:07:28 +03:00
s.kamardin 55776ffb29 Fixes, cleanup 2016-01-15 19:50:12 +03:00
s.kamardin d2a191e0f0 Tune, new feature test 2016-01-14 21:32:02 +03:00
s.kamardin c65eb46cf3 Cleanup 2016-01-14 18:38:16 +03:00
s.kamardin 3995275190 Optimizations 2016-01-14 18:29:13 +03:00
gobwas ce3a69147f Draw graphviz in tests 2016-01-13 01:26:48 +03:00
s.kamardin 0be4bc46d1 graphviz try 2016-01-12 20:49:12 +03:00
s.kamardin df67a5925f tests 2016-01-12 14:13:56 +03:00
s.kamardin f2255c18f5 Indexing all matchers 2016-01-12 14:06:59 +03:00
gobwas 787d8be671 Progress 2016-01-11 10:17:19 +03:00
gobwas 66fc4deeeb Fixes 2016-01-09 02:34:41 +03:00
gobwas 76b6c27015 Progress 2016-01-08 20:14:31 +03:00
s.kamardin d400ac872c lexer tests 2015-12-25 19:40:36 +03:00
s.kamardin 5b4ed87b27 add range, refactor 2015-12-24 17:54:54 +03:00