react-native-parsed-text icon indicating copy to clipboard operation
react-native-parsed-text copied to clipboard

how to implements using Hashtag and Bold text patterns together?

Open ameer-taghavi opened this issue 3 years ago • 3 comments

i added this pattern to handle hashtags: // #HASHTAG

{
  pattern: /#[^\s!@#$%^&*()=+./,\[{\]};:'"?><،؛؟-]+/gi,
  style: [_linkStyle, linkStyle, boldFont],
  onPress: handleHashtagPress,
}

and added this pattern to handle bold text: // **TEXT TO BOLD**

{
  pattern: /(?:\*\*)([^*]*)(?:\*\*)/,
  style: boldStyle,
  renderText: (matchingString, matches) => matches[1],
},

example: **test bold and #hashtag in text**

when using these together, bold text pattern not works. when change priority of patterns, hashtags not works, how can i use both patterns to support hashtag and bold text?

ameer-taghavi avatar Sep 14 '21 07:09 ameer-taghavi

https://github.com/taskrabbit/react-native-parsed-text/issues/81

kaueDM avatar Oct 28 '21 12:10 kaueDM

can you please write an example base on my question options? #81 not works for me!

ameer-taghavi avatar Oct 30 '21 09:10 ameer-taghavi

can you please write an example base on my question options? #81 not works for me!

The point of #81 is: It doesn't work. I'm waiting for a fix too.

kaueDM avatar Oct 31 '21 13:10 kaueDM