Show More
@@ -40,41 +40,7 b' class TestMarkdown(TestsBase):' | |||||
40 | '#test', |
|
40 | '#test', | |
41 | '##test', |
|
41 | '##test', | |
42 | 'test\n----', |
|
42 | 'test\n----', | |
43 |
'test [link](https://google.com/)' |
|
43 | 'test [link](https://google.com/)'] | |
44 | """ |
|
|||
45 | List |
|
|||
46 | ---- |
|
|||
47 | - Test |
|
|||
48 | - Test |
|
|||
49 | 1. Test |
|
|||
50 | 2. Test |
|
|||
51 | - Test |
|
|||
52 | - Test |
|
|||
53 | 2. Test |
|
|||
54 | """, |
|
|||
55 | "test\ntest", |
|
|||
56 | "test\n test", |
|
|||
57 | "test\n\n---\n\ntest", |
|
|||
58 | "test\n\n***\n\ntest", |
|
|||
59 | """ |
|
|||
60 | #Code |
|
|||
61 |
|
||||
62 | Below |
|
|||
63 |
|
||||
64 | def hello_world(self): |
|
|||
65 | print('hello_world') |
|
|||
66 |
|
||||
67 | """, |
|
|||
68 | """ |
|
|||
69 | Quote |
|
|||
70 | ----- |
|
|||
71 |
|
||||
72 | Mike said |
|
|||
73 |
|
||||
74 | > You are so cool! |
|
|||
75 | > I wish I could do that. |
|
|||
76 | """, |
|
|||
77 | "inline `quote`"] |
|
|||
78 |
|
44 | |||
79 |
|
45 | |||
80 | @onlyif_cmds_exist('pandoc') |
|
46 | @onlyif_cmds_exist('pandoc') | |
@@ -93,70 +59,7 b' Mike said' | |||||
93 | r'\section{test}', |
|
59 | r'\section{test}', | |
94 | r'\subsection{test}', |
|
60 | r'\subsection{test}', | |
95 | r'\subsection{test}', |
|
61 | r'\subsection{test}', | |
96 |
r'test \href{https://google.com/}{link}' |
|
62 | r'test \href{https://google.com/}{link}'] | |
97 | r""" |
|
|||
98 | \subsection{List} |
|
|||
99 |
|
||||
100 | \begin{itemize} |
|
|||
101 | \item |
|
|||
102 | Test |
|
|||
103 | \item |
|
|||
104 | Test |
|
|||
105 |
|
||||
106 | \begin{enumerate}[1.] |
|
|||
107 | \item |
|
|||
108 | Test |
|
|||
109 | \item |
|
|||
110 | Test |
|
|||
111 |
|
||||
112 | \begin{itemize} |
|
|||
113 | \item |
|
|||
114 | Test |
|
|||
115 | \item |
|
|||
116 | Test |
|
|||
117 | \end{itemize} |
|
|||
118 | \item |
|
|||
119 | Test |
|
|||
120 | \end{enumerate} |
|
|||
121 | \end{itemize} |
|
|||
122 | """, |
|
|||
123 | 'test test', |
|
|||
124 | 'test test', |
|
|||
125 | r""" |
|
|||
126 | test |
|
|||
127 |
|
||||
128 | \begin{center}\rule{3in}{0.4pt}\end{center} |
|
|||
129 |
|
||||
130 | test |
|
|||
131 | """, |
|
|||
132 | r""" |
|
|||
133 | test |
|
|||
134 |
|
||||
135 | \begin{center}\rule{3in}{0.4pt}\end{center} |
|
|||
136 |
|
||||
137 | test |
|
|||
138 | """, |
|
|||
139 | r""" |
|
|||
140 | \section{Code} |
|
|||
141 |
|
||||
142 | Below |
|
|||
143 |
|
||||
144 | \begin{verbatim} |
|
|||
145 | def hello_world(self): |
|
|||
146 | print('hello_world') |
|
|||
147 | \end{verbatim} |
|
|||
148 |
|
||||
149 | """, |
|
|||
150 | r""" |
|
|||
151 | \subsection{Quote} |
|
|||
152 |
|
||||
153 | Mike said |
|
|||
154 |
|
||||
155 | \begin{quote} |
|
|||
156 | You are so cool! I wish I could do that. |
|
|||
157 | \end{quote} |
|
|||
158 | """, |
|
|||
159 | r'inline \texttt{quote}'] |
|
|||
160 | for index, test in enumerate(self.tests): |
|
63 | for index, test in enumerate(self.tests): | |
161 | yield self._try_markdown2latex, test, results[index] |
|
64 | yield self._try_markdown2latex, test, results[index] | |
162 |
|
65 | |||
@@ -181,52 +84,7 b' You are so cool! I wish I could do that.' | |||||
181 | '<h1 id="test">test</h1>', |
|
84 | '<h1 id="test">test</h1>', | |
182 | '<h2 id="test">test</h2>', |
|
85 | '<h2 id="test">test</h2>', | |
183 | '<h2 id="test">test</h2>', |
|
86 | '<h2 id="test">test</h2>', | |
184 |
'<p>test <a href="https://google.com/">link</a></p>' |
|
87 | '<p>test <a href="https://google.com/">link</a></p>'] | |
185 | """ |
|
|||
186 | <h2 id="list">List</h2> |
|
|||
187 | <ul> |
|
|||
188 | <li>Test</li> |
|
|||
189 | <li>Test |
|
|||
190 | <ol style="list-style-type: decimal"> |
|
|||
191 | <li>Test</li> |
|
|||
192 | <li>Test |
|
|||
193 | <ul> |
|
|||
194 | <li>Test</li> |
|
|||
195 | <li>Test</li> |
|
|||
196 | </ul></li> |
|
|||
197 | <li>Test</li> |
|
|||
198 | </ol></li> |
|
|||
199 | </ul> |
|
|||
200 |
|
||||
201 | """, |
|
|||
202 | '<p>test test</p>', |
|
|||
203 | '<p>test test</p>', |
|
|||
204 | """ |
|
|||
205 | <p>test</p> |
|
|||
206 | <hr /> |
|
|||
207 | <p>test</p> |
|
|||
208 | """, |
|
|||
209 | """ |
|
|||
210 | <p>test</p> |
|
|||
211 | <hr /> |
|
|||
212 | <p>test</p> |
|
|||
213 | """, |
|
|||
214 | """ |
|
|||
215 | <h1 id="code">Code</h1> |
|
|||
216 | <p>Below</p> |
|
|||
217 | <pre><code>def hello_world(self): |
|
|||
218 | print('hello_world')</code></pre> |
|
|||
219 |
|
||||
220 | """, |
|
|||
221 | """ |
|
|||
222 | <h2 id="quote">Quote</h2> |
|
|||
223 | <p>Mike said</p> |
|
|||
224 | <blockquote> |
|
|||
225 | <p>You are so cool! I wish I could do that.</p> |
|
|||
226 | </blockquote> |
|
|||
227 |
|
||||
228 | """, |
|
|||
229 | '<p>inline <code>quote</code></p>'] |
|
|||
230 | for index, test in enumerate(self.tests): |
|
88 | for index, test in enumerate(self.tests): | |
231 | yield self._try_markdown2html, test, results[index] |
|
89 | yield self._try_markdown2html, test, results[index] | |
232 |
|
90 | |||
@@ -251,62 +109,7 b' You are so cool! I wish I could do that.' | |||||
251 | 'test\n====', |
|
109 | 'test\n====', | |
252 | 'test\n----', |
|
110 | 'test\n----', | |
253 | 'test\n----', |
|
111 | 'test\n----', | |
254 |
'test `link <https://google.com/>`_' |
|
112 | 'test `link <https://google.com/>`_'] | |
255 | """ |
|
|||
256 | List |
|
|||
257 | ---- |
|
|||
258 |
|
||||
259 | - Test |
|
|||
260 | - Test |
|
|||
261 |
|
||||
262 | 1. Test |
|
|||
263 | 2. Test |
|
|||
264 |
|
||||
265 | - Test |
|
|||
266 | - Test |
|
|||
267 |
|
||||
268 | 3. Test |
|
|||
269 |
|
||||
270 | """, |
|
|||
271 | 'test test', |
|
|||
272 | 'test test', |
|
|||
273 | """ |
|
|||
274 | test |
|
|||
275 |
|
||||
276 | -------------- |
|
|||
277 |
|
||||
278 | test |
|
|||
279 | """, |
|
|||
280 | """ |
|
|||
281 | test |
|
|||
282 |
|
||||
283 | -------------- |
|
|||
284 |
|
||||
285 | test |
|
|||
286 |
|
||||
287 | """, |
|
|||
288 | """ |
|
|||
289 | Code |
|
|||
290 | ==== |
|
|||
291 |
|
||||
292 | Below |
|
|||
293 |
|
||||
294 | :: |
|
|||
295 |
|
||||
296 | def hello_world(self): |
|
|||
297 | print('hello_world') |
|
|||
298 |
|
||||
299 | """, |
|
|||
300 | """ |
|
|||
301 | Quote |
|
|||
302 | ----- |
|
|||
303 |
|
||||
304 | Mike said |
|
|||
305 |
|
||||
306 | You are so cool! I wish I could do that. |
|
|||
307 |
|
||||
308 | """, |
|
|||
309 | 'inline ``quote``'] |
|
|||
310 | for index, test in enumerate(self.tests): |
|
113 | for index, test in enumerate(self.tests): | |
311 | yield self._try_markdown2rst, test, results[index] |
|
114 | yield self._try_markdown2rst, test, results[index] | |
312 |
|
115 |
General Comments 0
You need to be logged in to leave comments.
Login now