Skip to content

Commit

Permalink
adding period marker to ordered list item. #58
Browse files Browse the repository at this point in the history
  • Loading branch information
mientjan committed Jun 19, 2018
1 parent 5178151 commit 260fad0
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion example/react-native-markdown-renderer/lib/renderRules.js
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ const renderRules = {
if (hasParents(parent, 'ordered_list')) {
return (
<View key={node.key} style={styles.listOrderedItem}>
<Text style={styles.listOrderedItemIcon}>{node.index + 1}</Text>
<Text style={styles.listOrderedItemIcon}>{node.index + 1}{node.markup}</Text>
<View style={[styles.listItem]}>{children}</View>
</View>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ function createNode(token, tokenIndex) {
sourceInfo: token.info,
sourceMeta: token.meta,
block: token.block,
markup: token.markup,
key: getUniqueID(),
content,
tokenIndex,
Expand Down
2 changes: 1 addition & 1 deletion src/lib/renderRules.js
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ const renderRules = {
if (hasParents(parent, 'ordered_list')) {
return (
<View key={node.key} style={styles.listOrderedItem}>
<Text style={styles.listOrderedItemIcon}>{node.index + 1}</Text>
<Text style={styles.listOrderedItemIcon}>{node.index + 1}{node.markup}</Text>
<View style={[styles.listItem]}>{children}</View>
</View>
);
Expand Down
1 change: 1 addition & 0 deletions src/lib/util/tokensToAST.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ function createNode(token, tokenIndex) {
sourceInfo: token.info,
sourceMeta: token.meta,
block: token.block,
markup: token.markup,
key: getUniqueID(),
content,
tokenIndex,
Expand Down

0 comments on commit 260fad0

Please sign in to comment.