micazi/rich_text_controller

patternMap.entries.singleWhere throws state error when multiple regexps match

TonyDowney opened this issue · 1 comments

When the patternMap has two RegExp that both match the same String, this library throws a state error on patternMap.entries.singleWhere. I'd suggest replacing it with firstWhere and documenting the behaviour when multiple RegExp match.

Will work it out in the next version or if you'd like to fork and contribute i would highly appreciate it, Thank you! 😄