diff --git a/package.json b/package.json index 3d113b4..21b9003 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "type": "git", "url": "https://github.com/lwansbrough/react-native-markdown.git" }, - "version": "0.1.1", + "version": "0.1.2", "description": "A component for rendering Markdown in React Native", "main": "Markdown.js", "author": "Lochlan Wansbrough (http://lwansbrough.com)", diff --git a/rules.js b/rules.js index f1956d0..2300e3f 100644 --- a/rules.js +++ b/rules.js @@ -3,6 +3,7 @@ var { Image, Text, View, + Linking } = React; var SimpleMarkdown = require('simple-markdown'); var _ = require('lodash'); @@ -100,7 +101,10 @@ module.exports = function(styles) { state.withinText = true; return React.createElement(Text, { key: state.key, - style: styles.autolink + style: styles.autolink, + onPress: function () { + Linking.openURL(node.content[0].content); + } }, output(node.content, state)); } },