Closed larryrobinson closed 2 years ago
Currently, the core function of EasyRichText
requires lookbehind
in Regex. However Safari does not support lookbehind
. I could add an option to skip the lookbehind
to avoid the error. But most of EasyRichText
's functions will be lost.
I suspected this was the case. I think people have been asking the Safari team to enable look behind since at least 2018. We've had to rewrite some of our RegEx statements to not use look behind and that makes RegEx even more unpalatable than it already is.
I appreciate the offer for adding an option but that negates all the great functionality of the package. We will find another way to get done what we need. Thanks for all your work and support on EasyRichText. It's a really nice package.
Feel free to close this issue. Thanks again!
Hey @larryrobinson, did you find a way to fix this?
@iabdousd Unfortunately not. As I mentioned above Safari's implementation of RegEx doesn't do look behind and EasyRichText relies on it to work properly. We ended reverting back to Flutter's Rich Text control which works great across all browsers but the code is more verbose.
The RegEx for doing pattern matches in easy_rich_text does not work in the Safari browser. Below is the code sample that blows up Safari and I've also attached a screen shot of the error message in the browser.
`
Widget instructions() { return Padding( padding: const EdgeInsets.only(left: 0, right: 0), child: EasyRichText( "Below are the menu images that have been uploaded. Select one and then click items.", defaultStyle: instructionStyle, patternList: [ EasyRichTextPattern( targetString: 'items', style: instructionStyle.copyWith(fontWeight: FontWeight.bold), ), ], ), ); }
`