react-native-html-to-text
react-native-html-to-text copied to clipboard
a tags not rendering correctly
when "test" it show the test but its showing www.ggolge.com
in HtmlText.js
it should be
if(isHyperlink(nodeName)){
const key = ${parentKey}_text
const href = node.attrs[0];
return (
<Text key={key}
style={[props.style, styleForTag(nodeName)]}
onPress={()=>{
Linking.canOpenURL(href.value)
.then(supported => {
if (!supported) {
console.warn('Can't handle url: ' + href.value);
} else {
return Linking.openURL(href.value);
}
}).catch(err => console.error('An error occurred', err));
}}>
{node.childNodes[0].value}
</Text>
)
}