You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+45-3Lines changed: 45 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -61,7 +61,7 @@ The `<Markdown>` object takes the following common props:
61
61
62
62
| Property | Default | Required | Description
63
63
| --- | --- | --- | ---
64
-
| `children` | N/A | `true` | The markdown string to render
64
+
| `children` | N/A | `true` | The markdown string to render, or the [pre-processed tree](#pre-processing)
65
65
| `style` | [source](https://github.com/iamacup/react-native-markdown-display/blob/master/src/lib/styles.js) | `false` | An object to override the styling for the various rules, [see style section below](#style) for more info
66
66
| `mergeStyle` | `true` | `false` | If true, when a style is supplied, the individual items are merged with the default styles instead of overwriting them
67
67
| `rules` | [source](https://github.com/iamacup/react-native-markdown-display/blob/master/src/lib/renderRules.js) | `false` | An object of rules that specify how to render each markdown item, [see rules section below](#rules) for more info
constcopy=`[This is a link!](https://github.com/iamacup/react-native-markdown-display/)`;
1039
1039
@@ -1120,6 +1120,48 @@ export default App;
1120
1120
A full list of things you can turn off is [here](https://github.com/markdown-it/markdown-it/blob/master/lib/presets/commonmark.js)
1121
1121
1122
1122
1123
+
### Pre Processing
1124
+
1125
+
It is possible to need to pre-process the data outside of this library ([related discussion here](https://github.com/iamacup/react-native-markdown-display/issues/79)). As a result, you can pass an AST tree directly as the children like this:
1126
+
1127
+
```jsx
1128
+
importReactfrom'react';
1129
+
import { SafeAreaView, ScrollView, StatusBar, Text } from'react-native';
Copy file name to clipboardExpand all lines: package.json
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
{
2
2
"name": "react-native-markdown-display",
3
-
"version": "6.1.4",
3
+
"version": "6.1.5",
4
4
"description": "Markdown renderer for react-native, with CommonMark spec support + adds syntax extensions & sugar (URL autolinking, typographer), originally created by Mient-jan Stelling as react-native-markdown-renderer",
0 commit comments