Skip to content

Commit 9b8f03d

Browse files
authoredMar 28, 2018
Merge pull request #30 from redbrick-health/additional-adds
Adding hardbreak rule
2 parents e4b410f + a2606f0 commit 9b8f03d

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed
 

‎package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-native-markdown-renderer",
3-
"version": "3.0.2",
3+
"version": "3.1.0",
44
"description": "Markdown renderer for react-native, with CommonMark spec support + adds syntax extensions & sugar (URL autolinking, typographer).",
55
"main": "src/index.js",
66
"scripts": {},

‎src/lib/renderRules.js

+4
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,10 @@ const renderRules = {
112112
</View>
113113
),
114114

115+
hardbreak: (node, children, parent, styles) => (
116+
<View key={node.key} style={styles.hardbreak} />
117+
),
118+
115119
blockquote: (node, children, parent, styles) => (
116120
<View key={node.key} style={styles.blockquote}>
117121
{children}

‎src/lib/styles.js

+4
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,10 @@ export const styles = StyleSheet.create({
122122
alignItems: "flex-start",
123123
justifyContent: "flex-start"
124124
},
125+
hardbreak: {
126+
width: '100%',
127+
height: 1
128+
},
125129
strong: {
126130
fontWeight: "bold"
127131
},

0 commit comments

Comments
 (0)