iamacup / react-native-markdown-display

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

Rule component tags get stripped #179

Closed dnadan2 closed 8 months ago

dnadan2 commented 2 years ago

I have a situation where i am returning a custom component in the rules as such:

strong: (node, children, _parent, styles) => ( <CustomComponent style={{backgroundColour: 'red'}} accessibilityLabel="example" align="right"

{children} ),

In this case the following props "accessibilityLabel" (which is a react native prop) and "align" (which is a custom prop on my component) get stripped off and have no effect. This means i have no way to define accessible components or manipulate the props in my custom component.