micazi/rich_text_controller

stringMatchMap should have option to contain string or exact word match

Closed this issue · 1 comments

Example :
For the text 'rainbon rainbontt' if i added string match map {rainbon : someStyle, rainbontt : : someStyle}

  • someStyle applied on rainbon only
    When I debug on Match handler only comes to 1. rainbon not for rainbontt. So UI Look Like in screenshot

Screenshot 2022-11-28 at 5 39 10 PM

@micazi

For temporary solution i added space in regex ::
Screenshot 2022-11-28 at 5 40 15 PM
RegExp(r'\b' + stringMatchMap!.keys.join(' |').toString() + r'+\b')

Thank you for your contribution, will look into it and integrate!