diff --git a/package.json b/package.json index 6ece481..f6e5c42 100644 --- a/package.json +++ b/package.json @@ -19,7 +19,7 @@ "dependencies": { "lodash": "^4.15.0", "prop-types": "^15.6.0", - "simple-markdown": "^0.3.1" + "simple-markdown": "1.0.0-alpha.0" }, "peerDependencies": { "react": "*", diff --git a/src/index.js b/src/index.js index f3f16bb..f518fe4 100644 --- a/src/index.js +++ b/src/index.js @@ -68,7 +68,7 @@ class Markdown extends Component { const tree = SimpleMarkdown.parserFor(rules)(blockSource, { inline: false, }) - return SimpleMarkdown.reactFor(SimpleMarkdown.ruleOutput(rules, 'react'))( + return SimpleMarkdown.outputFor(rules, 'react')( tree, ) } diff --git a/src/rules.js b/src/rules.js index 5514704..26ba03c 100644 --- a/src/rules.js +++ b/src/rules.js @@ -96,7 +96,7 @@ export default styles => ({ react: (node, output, parentState) => { const state = { ...parentState } state.withinText = true - const stylesToApply = [styles.heading, styles[`heading ${node.level}`]] + const stylesToApply = [styles.heading, styles[`heading${node.level}`]] state.stylesToApply = stylesToApply return createElement( Text, diff --git a/yarn.lock b/yarn.lock index d5d37a7..69da5fe 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2688,9 +2688,9 @@ signal-exit@^3.0.0, signal-exit@^3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.2.tgz#b5fdc08f1287ea1178628e415e25132b73646c6d" -simple-markdown@^0.3.1: - version "0.3.2" - resolved "https://registry.yarnpkg.com/simple-markdown/-/simple-markdown-0.3.2.tgz#eb3902dc3bcf74fdfc1883230286dcadea870dc0" +simple-markdown@0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/simple-markdown/-/simple-markdown-0.4.0.tgz#86ec1344c7747a3ca120f5e4325be88cb4a67cc3" slash@^1.0.0: version "1.0.0"