Wrong weight for text/x-todo-txt glob rule
Hi,
When matching against a filename todo.txt
, the algorithm will return two matches:
- one for
text/x-todo-txt
with weight=10 and length=8 - one for
text/plain
with weight=50 and length=5
After sorting by weight and length, the matches will ordered like so:
[0]: text/plain
[1]: text/x-todo-txt
Since the algorithm must then pick the first match, the text/plain
rules always wins.
Therefore, the glob rule for text/x-todo-txt
should be updated to have a weight of 50.
Edited by ju1ius