From 260fad084a11006201cc657fdc64f54d4625fd38 Mon Sep 17 00:00:00 2001 From: Mient-jan Stelling Date: Tue, 19 Jun 2018 14:48:01 +0200 Subject: [PATCH] adding period marker to ordered list item. #58 --- example/react-native-markdown-renderer/lib/renderRules.js | 2 +- example/react-native-markdown-renderer/lib/util/tokensToAST.js | 1 + src/lib/renderRules.js | 2 +- src/lib/util/tokensToAST.js | 1 + 4 files changed, 4 insertions(+), 2 deletions(-) diff --git a/example/react-native-markdown-renderer/lib/renderRules.js b/example/react-native-markdown-renderer/lib/renderRules.js index c93b066..67a180c 100644 --- a/example/react-native-markdown-renderer/lib/renderRules.js +++ b/example/react-native-markdown-renderer/lib/renderRules.js @@ -179,7 +179,7 @@ const renderRules = { if (hasParents(parent, 'ordered_list')) { return ( - {node.index + 1} + {node.index + 1}{node.markup} {children} ); diff --git a/example/react-native-markdown-renderer/lib/util/tokensToAST.js b/example/react-native-markdown-renderer/lib/util/tokensToAST.js index f399a36..4428c29 100644 --- a/example/react-native-markdown-renderer/lib/util/tokensToAST.js +++ b/example/react-native-markdown-renderer/lib/util/tokensToAST.js @@ -26,6 +26,7 @@ function createNode(token, tokenIndex) { sourceInfo: token.info, sourceMeta: token.meta, block: token.block, + markup: token.markup, key: getUniqueID(), content, tokenIndex, diff --git a/src/lib/renderRules.js b/src/lib/renderRules.js index c93b066..67a180c 100644 --- a/src/lib/renderRules.js +++ b/src/lib/renderRules.js @@ -179,7 +179,7 @@ const renderRules = { if (hasParents(parent, 'ordered_list')) { return ( - {node.index + 1} + {node.index + 1}{node.markup} {children} ); diff --git a/src/lib/util/tokensToAST.js b/src/lib/util/tokensToAST.js index f399a36..4428c29 100644 --- a/src/lib/util/tokensToAST.js +++ b/src/lib/util/tokensToAST.js @@ -26,6 +26,7 @@ function createNode(token, tokenIndex) { sourceInfo: token.info, sourceMeta: token.meta, block: token.block, + markup: token.markup, key: getUniqueID(), content, tokenIndex,