iamacup / react-native-markdown-display

React Native 100% compatible CommonMark renderer

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

ebasic opened this issue · comments

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

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

@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...

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