iamacup / react-native-markdown-display

React Native 100% compatible CommonMark renderer
MIT License
564 stars 166 forks source link

No support for <u> tag & Link click does not work & & Can't pass both style and rules at the same time #193

Closed ebasic closed 8 months ago

ebasic commented 1 year ago

Still no support for <u> tags. Looking forward for some suggestions how to add some custom solutions.

Tried to pass styles and rules at the same time (used default styles and rules provided on official documentation) but app crashed and TS raised an error too. Styles alone work perfectly and I was able to change stylings on desired elements, but now I wanted to customize rule for link because click on it didn't work although it rendered link correctly (underlined and colored as I specified in styles).

Screenshot from IDE:

Screenshot 2023-05-13 at 01 54 34

Screenshot from app crashed: image_123986672

ebasic commented 1 year ago

@iamacup No support for underline, bold and italic for some reason, React 18. It just renders html tags as normal text.

sebastianjung commented 1 year ago

@ebasic You might want to check that you are not overwriting default body styles with something like fontFamily: "Overpass_400Regular"

Had this problem with bold and italic not being applied. is still not parsed correctly though...

darishodzic commented 11 months ago

Solution for underline: const contentWithUnderline = content?.replaceAll('<u>', '[')?.replaceAll('</u>', ']()')