Skip to content

Commit e4b410f

Browse files
committed
- fixed issue where orderedLists and unorderedLists where cut off when having a long length. #21
- fixed issue where orderedLists and unorderedLists where mis aligned. #22 - updating to 3.0.2
1 parent 3a54cb9 commit e4b410f

File tree

4 files changed

+41
-8
lines changed

4 files changed

+41
-8
lines changed

example/src/copyAllCheckboxPlugin.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,17 @@
11
const markdownText = `
2+
3+
+ Selected third parties include:
4+
- Service providers assigned to carrying out your service contract when placing a booking on the company. Ac tristique libero volutpat at Ac tristique libero volutpat at Ac tristique libero volutpat at Ac tristique libero volutpat at Ac tristique libero volutpat at
5+
- Service providers assigned to carrying out your service contract when placing a booking on the company. Ac tristique libero volutpat at Ac tristique libero volutpat at Ac tristique libero volutpat at Ac tristique libero volutpat at Ac tristique libero volutpat at
6+
- Service providers assigned to carrying out your service contract when placing a booking on the company. Ac tristique libero volutpat at Ac tristique libero volutpat at Ac tristique libero volutpat at Ac tristique libero volutpat at Ac tristique libero volutpat at
7+
8+
+ Sub-lists are made by indenting 2 spaces:
9+
- Marker character change forces new list start:
10+
* Ac tristique libero volutpat at
11+
+ Facilisis in pretium nisl aliquet
12+
- Nulla volutpat aliquam velit
13+
+ Very easy!
14+
215
## ![loading](https://www.hippomundo.com/images/loading.gif) Images
316
417
![Minion](https://octodex.github.com/images/minion.png)

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-native-markdown-renderer",
3-
"version": "3.0.1",
3+
"version": "3.0.2",
44
"description": "Markdown renderer for react-native, with CommonMark spec support + adds syntax extensions & sugar (URL autolinking, typographer).",
55
"main": "src/index.js",
66
"scripts": {},

src/lib/enum/PlatformEnum.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
export default {
2+
IOS: "ios",
3+
ANDROID: "android"
4+
};

src/lib/styles.js

Lines changed: 23 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import { StyleSheet } from "react-native";
1+
import { Platform, StyleSheet } from "react-native";
2+
import PlatformEnum from "./enum/PlatformEnum";
23

34
/**
45
*
@@ -65,19 +66,28 @@ export const styles = StyleSheet.create({
6566
},
6667
list: {},
6768
listItem: {
69+
flex: 1,
6870
flexWrap: "wrap"
6971
// backgroundColor: 'green',
7072
},
7173
listUnordered: {},
7274

7375
listUnorderedItem: {
74-
flexDirection: "row"
76+
flexDirection: "row",
77+
justifyContent: "flex-start"
7578
},
7679

7780
listUnorderedItemIcon: {
7881
marginLeft: 10,
7982
marginRight: 10,
80-
lineHeight: 40
83+
...Platform.select({
84+
[PlatformEnum.IOS]: {
85+
lineHeight: 36
86+
},
87+
[PlatformEnum.ANDROID]: {
88+
lineHeight: 30
89+
}
90+
})
8191
},
8292
listUnorderedItemText: {
8393
fontSize: 20,
@@ -91,7 +101,14 @@ export const styles = StyleSheet.create({
91101
listOrderedItemIcon: {
92102
marginLeft: 10,
93103
marginRight: 10,
94-
lineHeight: 40
104+
...Platform.select({
105+
[PlatformEnum.IOS]: {
106+
lineHeight: 36
107+
},
108+
[PlatformEnum.ANDROID]: {
109+
lineHeight: 30
110+
}
111+
})
95112
},
96113
listOrderedItemText: {
97114
fontWeight: "bold",
@@ -134,14 +151,13 @@ export const styles = StyleSheet.create({
134151
textDecorationLine: "line-through"
135152
},
136153
link: {
137-
textDecorationLine: "underline",
154+
textDecorationLine: "underline"
138155
},
139156
u: {
140157
borderColor: "#000000",
141158
borderBottomWidth: 1
142159
},
143160
image: {
144-
flex: 1,
145-
161+
flex: 1
146162
}
147163
});

0 commit comments

Comments
 (0)