kelesi / mtga-utils

Magic the Gathering: Arena related stuff (Card collection export)
MIT License
53 stars 13 forks source link

Keyword matching does not match whole words #21

Closed kelesi closed 4 years ago

kelesi commented 4 years ago

One small issue I found: the keyword matching matches prefixes, so if there were two responses in the log for (say) <== KeywordOne {"id":1,"payload":{}} followed by <== KeywordOneHundred {"id":2,"payload":{}}, attempting to fetch <== KeywordOne fails as it attempts to parse Hundred {"id":2,"payload":{}} as a JSON string. Doesn't seem to affect the actual game logs for now.

Originally posted by @pak21 in https://github.com/kelesi/mtga-utils/issues/19#issuecomment-558373540

kelesi commented 4 years ago

Thank you @pak21 for pointing this out. Fixed in https://github.com/kelesi/mtga-utils/commit/a14b0fd6a64de4c8f70ef6627669523f32e3da1c