Skip to content

Commit

Permalink
Merge pull request #30 from redbrick-health/additional-adds
Browse files Browse the repository at this point in the history
Adding hardbreak rule
  • Loading branch information
mientjan authored Mar 28, 2018
2 parents e4b410f + a2606f0 commit 9b8f03d
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-native-markdown-renderer",
"version": "3.0.2",
"version": "3.1.0",
"description": "Markdown renderer for react-native, with CommonMark spec support + adds syntax extensions & sugar (URL autolinking, typographer).",
"main": "src/index.js",
"scripts": {},
Expand Down
4 changes: 4 additions & 0 deletions src/lib/renderRules.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,10 @@ const renderRules = {
</View>
),

hardbreak: (node, children, parent, styles) => (
<View key={node.key} style={styles.hardbreak} />
),

blockquote: (node, children, parent, styles) => (
<View key={node.key} style={styles.blockquote}>
{children}
Expand Down
4 changes: 4 additions & 0 deletions src/lib/styles.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,10 @@ export const styles = StyleSheet.create({
alignItems: "flex-start",
justifyContent: "flex-start"
},
hardbreak: {
width: '100%',
height: 1
},
strong: {
fontWeight: "bold"
},
Expand Down

0 comments on commit 9b8f03d

Please sign in to comment.