Skip to content

Commit 1def748

Browse files
committed
fixing issue where softbreak is not seen as a inline element. #44
1 parent d4f7e2e commit 1def748

File tree

3 files changed

+13
-8
lines changed

3 files changed

+13
-8
lines changed

example/App.js

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,16 @@ const renderer = new AstRenderer(
6060
);
6161

6262
const routes = {
63-
all: () => <ScrollView><Markdown children={all} /></ScrollView>,
64-
linkedimg: () => <ScrollView><Markdown children={linkedimg} /></ScrollView>,
63+
all: () => (
64+
<ScrollView>
65+
<Markdown children={all} />
66+
</ScrollView>
67+
),
68+
linkedimg: () => (
69+
<ScrollView>
70+
<Markdown children={linkedimg} />
71+
</ScrollView>
72+
),
6573
};
6674

6775
const initialLayout = {
@@ -72,10 +80,7 @@ const initialLayout = {
7280
export default class App extends Component {
7381
state = {
7482
index: 0,
75-
routes: [
76-
{ key: 'all', title: 'All Markdown' },
77-
{ key: 'linkedimg', title: 'Linked Images' },
78-
],
83+
routes: [{ key: 'all', title: 'All Markdown' }, { key: 'linkedimg', title: 'Linked Images' }],
7984
};
8085

8186
getView(value) {

example/react-native-markdown-renderer/lib/util/getIsInlineTextType.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const textTypes = [
99
'link',
1010
's',
1111
'em',
12-
'br',
12+
'softbreak',
1313
];
1414

1515
/**

src/lib/util/getIsInlineTextType.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const textTypes = [
99
'link',
1010
's',
1111
'em',
12-
'br',
12+
'softbreak',
1313
];
1414

1515
/**

0 commit comments

Comments
 (0)