@@ -6,173 +6,8 @@ import Markdown, {
66 renderRules ,
77 getUniqueID ,
88} from 'react-native-markdown-renderer' ;
9-
10- const markdownText = `
11- # Syntax Support
12-
13- __Advertisement :)__
14-
15- This is a text. Click [here](https://google.com) to open a link. Let's add some more text to see how this behaves.
16-
17- - __[pica](https://nodeca.github.io/pica/demo/)__ - high quality and fast image
18- resize in browser.
19- - __[babelfish](https://github.com/nodeca/babelfish/)__ - developer friendly
20- i18n with plurals support and easy syntax.
21-
22- You will like those projects!
23-
24- ---
25-
26- # h1 Heading 8-)
27- ## h2 Heading
28- ### h3 Heading
29- #### h4 Heading
30- ##### h5 Heading
31- ###### h6 Heading
32-
33-
34- ### Horizontal Rules
35-
36- ___
37-
38- ---
39-
40-
41- ### Typographic replacements
42-
43- Enable typographer option to see result.
44-
45- (c) (C) (r) (R) (tm) (TM) (p) (P) +-
46-
47- test.. test... test..... test?..... test!....
48-
49- !!!!!! ???? ,, -- ---
50-
51- "Smartypants, double quotes" and 'single quotes'
52-
53-
54- ## Emphasis
55-
56- **This is bold text**
57-
58- __This is bold text__
59-
60- *This is italic text*
61-
62- _This is italic text_
63-
64- ~~Strikethrough~~
65-
66-
67- ## Blockquotes
68-
69-
70- > Blockquotes can also be nested...
71- >> ...by using additional greater-than signs right next to each other...
72- > > > ...or with spaces between arrows.
73-
74-
75- ## Lists
76-
77- Unordered
78-
79- + Create a list by starting a line with \`+\`, \`-\`, or \`*\`
80- + Sub-lists are made by indenting 2 spaces:
81- - Marker character change forces new list start:
82- * Ac tristique libero volutpat at
83- + Facilisis in pretium nisl aliquet
84- - Nulla volutpat aliquam velit
85- + Very easy!
86-
87- Ordered
88-
89- 1. Lorem ipsum dolor sit amet
90- 2. Consectetur adipiscing elit
91- 3. Integer molestie lorem at massa
92-
93-
94- 1. You can use sequential numbers...
95- 1. ...or keep all the numbers as \`1.\`
96-
97- Start numbering with offset:
98-
99- 57. foo
100- 1. bar
101-
102-
103- ## Code
104-
105- Inline \`code\`
106-
107- Indented code
108-
109- // Some comments
110- line 1 of code
111- line 2 of code
112- line 3 of code
113-
114-
115- Block code "fences"
116-
117- \`\`\`
118- Sample text here...
119- \`\`\`
120-
121- Syntax highlighting
122-
123- \`\`\` js
124- var foo = function (bar) {
125- return bar++;
126- };
127-
128- console.log(foo(5));
129- \`\`\`
130-
131- ## Tables
132-
133- | Option | Description |
134- | ------ | ----------- |
135- | data | path to data files to supply the data that will be passed into templates. |
136- | engine | engine to be used for processing templates. Handlebars is the default. |
137- | ext | extension to be used for dest files. |
138-
139- Right aligned columns
140-
141- | Option | Description |
142- | ------:| -----------:|
143- | data | path to data files to supply the data that will be passed into templates. |
144- | engine | engine to be used for processing templates. Handlebars is the default. |
145- | ext | extension to be used for dest files. |
146-
147-
148- ## Links
149-
150- [link text](http://dev.nodeca.com)
151-
152- [link with title](http://nodeca.github.io/pica/demo/ "title text!")
153-
154- Autoconverted link https://github.com/nodeca/pica (enable linkify to see)
155-
156-
157- ## Images
158-
159- 
160- 
161-
162- Like links, Images also have a footnote style syntax
163-
164- ![Alt text][id]
165-
166- With a reference later in the document defining the URL location:
167-
168- [id]: https://octodex.github.com/images/dojocat.jpg "The Dojocat"
169- ` ;
170-
171- const markdownText2 = ` # Syntax Support
172-
173- __Advertisement :)__
174-
175- This is a text. Click [here](https://google.com) to open a link. Let's add some more text to see how this behaves.` ;
9+ import copyAll from "./src/copyAll" ;
10+ import customMarkdownStyle from "./src/customMarkdownStyle" ;
17611
17712/**
17813 * i'm overriding the default h1 render function.
@@ -196,14 +31,23 @@ export default class App extends Component {
19631 view : 0 ,
19732 } ;
19833
199- list = [ { description : 'custom renderer' } , { description : 'custom style sheet' } ] ;
34+ list = [
35+ { description : 'default' } ,
36+ { description : 'custom renderer' } ,
37+ { description : 'custom style sheet' }
38+ ] ;
20039
20140 getView ( value ) {
20241
203- console . warn ( value ) ;
20442 switch ( value ) {
20543 case 0 : {
206- return < Markdown renderer = { renderer . render } children = { markdownText } /> ;
44+ return < Markdown children = { copyAll } /> ;
45+ }
46+ case 1 : {
47+ return < Markdown renderer = { renderer . render } children = { copyAll } /> ;
48+ }
49+ case 2 : {
50+ return < Markdown style = { customMarkdownStyle } children = { copyAll } /> ;
20751 }
20852 default : {
20953 return (
0 commit comments