diff options
author | Ashkan Kiani <ashkan.k.kiani@gmail.com> | 2019-10-18 21:51:56 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-10-18 21:51:56 -0700 |
commit | 83ddc656b3455f066196c7f535402ec7ee4f34de (patch) | |
tree | ab9e6fdfa78ce8f0deb6e136ea3403613c2c929a /test | |
parent | Change wording in README. (diff) |
Improve algorithm performance and correctness. (#15)
- Disable highlighting for HEX codes and NAME codes when
preceded by alphanumeric codes.
- Hand written parser with 1 pass parsing.
- Update Trie to be more ergonomic.
- Add test file with expected outputs for edge cases.
- Cache matcher creation and refactor.
- Refactor
Faster than ever baby
Diffstat (limited to 'test')
-rw-r--r-- | test/expectation.txt | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/test/expectation.txt b/test/expectation.txt new file mode 100644 index 0000000..915d4de --- /dev/null +++ b/test/expectation.txt @@ -0,0 +1,45 @@ +-- vim:ft=lua +require'colorizer'.attach_to_buffer(0, {css=true}) + +--[[ SUCCESS +#F0F +#FF00FF +#FFF00F8F + #F0F + #FF00FF + #FFF00F8F + #F0F 1 + #FF00FF 1 + #FFF00F8F 1 +Blue Gray LightBlue Gray100 White +White +#def +#deadbeef +rgba(0,0,0,0) +rgb(0,0,0) +rgb(10, 100 , 100) +hsl(300,50%,50%) +hsla(300,50%,50%,0.5) +hsla(300,50%,50%,1.0000000000000001) +hsla(360,50%,50%,1.0000000000000001) +]] + +--[[ FAIL +#F0FF +#F0FFF +#F0FFF0F +#F0FFF0FFF +Blueberry Gray1000 BlueGree BlueGray +#define +#def0 +matcher#add +rgb(10,256,100) +rgb (10,255,100) +rgb(10, 1 00 , 100) +hsla(300,50%,50%,05) +hsla(300,50%,50%,1.000000000000001) +hsla(300,50%,50,1.0000000000000001) +hsla(300,50,50,1.0000000000000001) +hsla(361,50,50,1.0000000000000001) +]] + |