markdown_convert 1.2.12__py3-none-any.whl → 1.2.30__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- markdown_convert/__init__.py +11 -0
- markdown_convert/__main__.py +95 -0
- markdown_convert/code.css +73 -73
- markdown_convert/default.css +223 -373
- markdown_convert/modules/__init__.py +4 -0
- markdown_convert/modules/constants.py +25 -0
- markdown_convert/modules/convert.py +338 -0
- markdown_convert/modules/resources.py +101 -0
- markdown_convert/modules/transform.py +94 -0
- markdown_convert/modules/utils.py +38 -0
- markdown_convert/modules/validate.py +61 -0
- markdown_convert-1.2.30.dist-info/METADATA +105 -0
- markdown_convert-1.2.30.dist-info/RECORD +16 -0
- {markdown_convert-1.2.12.dist-info → markdown_convert-1.2.30.dist-info}/WHEEL +1 -1
- {markdown_convert-1.2.12.dist-info → markdown_convert-1.2.30.dist-info}/licenses/LICENSE +339 -339
- markdown_convert-1.2.12.dist-info/METADATA +0 -80
- markdown_convert-1.2.12.dist-info/RECORD +0 -7
- {markdown_convert-1.2.12.dist-info → markdown_convert-1.2.30.dist-info}/entry_points.txt +0 -0
markdown_convert/default.css
CHANGED
|
@@ -1,373 +1,223 @@
|
|
|
1
|
-
|
|
2
|
-
/* --
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
font-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
font-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
font-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
font-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
/*
|
|
161
|
-
|
|
162
|
-
size:
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
:
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
font-size: 2.4rem;
|
|
225
|
-
}
|
|
226
|
-
|
|
227
|
-
h4 {
|
|
228
|
-
font-size: 1.8rem;
|
|
229
|
-
}
|
|
230
|
-
|
|
231
|
-
h5 {
|
|
232
|
-
font-size: 1.4rem;
|
|
233
|
-
}
|
|
234
|
-
|
|
235
|
-
p {
|
|
236
|
-
font-size: 1.2rem;
|
|
237
|
-
}
|
|
238
|
-
|
|
239
|
-
/* Links */
|
|
240
|
-
a {
|
|
241
|
-
color: #09f;
|
|
242
|
-
margin: 0;
|
|
243
|
-
vertical-align: baseline;
|
|
244
|
-
}
|
|
245
|
-
|
|
246
|
-
/* Lists */
|
|
247
|
-
ul,
|
|
248
|
-
ol {
|
|
249
|
-
font-size: 1.2rem;
|
|
250
|
-
padding: 0;
|
|
251
|
-
margin-top: var(--top-margin);
|
|
252
|
-
margin-right: 0;
|
|
253
|
-
margin-bottom: var(--bottom-margin);
|
|
254
|
-
margin-left: var(--left-margin-big);
|
|
255
|
-
}
|
|
256
|
-
|
|
257
|
-
ul ol,
|
|
258
|
-
ol ul,
|
|
259
|
-
ol ol,
|
|
260
|
-
ul ul {
|
|
261
|
-
margin-top: 0;
|
|
262
|
-
}
|
|
263
|
-
|
|
264
|
-
li {
|
|
265
|
-
margin-top: 0.5rem;
|
|
266
|
-
}
|
|
267
|
-
|
|
268
|
-
/* Code blocks */
|
|
269
|
-
pre {
|
|
270
|
-
padding: 0;
|
|
271
|
-
white-space: pre-wrap;
|
|
272
|
-
}
|
|
273
|
-
|
|
274
|
-
code {
|
|
275
|
-
font-family: "JetBrains Mono", "Courier New", Courier, monospace;
|
|
276
|
-
font-size: 1rem;
|
|
277
|
-
background-color: #eee;
|
|
278
|
-
padding-left: 0.4em;
|
|
279
|
-
padding-right: 0.4em;
|
|
280
|
-
display: inline-block;
|
|
281
|
-
border-radius: 0.3em;
|
|
282
|
-
line-height: 1.5;
|
|
283
|
-
}
|
|
284
|
-
|
|
285
|
-
h1 code,
|
|
286
|
-
h2 code,
|
|
287
|
-
h3 code,
|
|
288
|
-
h4 code,
|
|
289
|
-
h5 code {
|
|
290
|
-
font-size: 0.8em;
|
|
291
|
-
}
|
|
292
|
-
|
|
293
|
-
/* Quotes */
|
|
294
|
-
blockquote {
|
|
295
|
-
margin-top: var(--top-margin);
|
|
296
|
-
margin-left: var(--left-margin);
|
|
297
|
-
max-width: 30em;
|
|
298
|
-
border-left: 4px solid #ccc;
|
|
299
|
-
padding-left: 0.5em;
|
|
300
|
-
color: #666;
|
|
301
|
-
}
|
|
302
|
-
|
|
303
|
-
blockquote>blockquote {
|
|
304
|
-
margin-left: var(--left-margin-small);
|
|
305
|
-
}
|
|
306
|
-
|
|
307
|
-
/* Figures */
|
|
308
|
-
img {
|
|
309
|
-
display: block;
|
|
310
|
-
margin: 2em auto 1em auto;
|
|
311
|
-
max-width: 80%;
|
|
312
|
-
}
|
|
313
|
-
|
|
314
|
-
/* -- Figure footer */
|
|
315
|
-
p>img+em {
|
|
316
|
-
text-align: center;
|
|
317
|
-
font-size: 1rem;
|
|
318
|
-
font-style: italic;
|
|
319
|
-
color: #666;
|
|
320
|
-
display: block;
|
|
321
|
-
margin: 1em auto 2em;
|
|
322
|
-
}
|
|
323
|
-
|
|
324
|
-
/* Tables */
|
|
325
|
-
table {
|
|
326
|
-
font-size: 1rem;
|
|
327
|
-
border-collapse: collapse;
|
|
328
|
-
margin-top: var(--top-margin);
|
|
329
|
-
text-align: left;
|
|
330
|
-
table-layout: auto;
|
|
331
|
-
}
|
|
332
|
-
|
|
333
|
-
thead {
|
|
334
|
-
background-color: #eee;
|
|
335
|
-
}
|
|
336
|
-
|
|
337
|
-
tbody {
|
|
338
|
-
color: #666;
|
|
339
|
-
}
|
|
340
|
-
|
|
341
|
-
th,
|
|
342
|
-
td {
|
|
343
|
-
padding: 0.5em 0.75em;
|
|
344
|
-
border: 1px solid #ccc;
|
|
345
|
-
white-space: nowrap;
|
|
346
|
-
}
|
|
347
|
-
|
|
348
|
-
col {
|
|
349
|
-
width: auto;
|
|
350
|
-
}
|
|
351
|
-
|
|
352
|
-
/* Page breaks */
|
|
353
|
-
.pagebreak {
|
|
354
|
-
clear: both;
|
|
355
|
-
page-break-after: always;
|
|
356
|
-
}
|
|
357
|
-
|
|
358
|
-
.pagebreak+* {
|
|
359
|
-
margin-top: 0;
|
|
360
|
-
}
|
|
361
|
-
|
|
362
|
-
li,
|
|
363
|
-
table,
|
|
364
|
-
blockquote,
|
|
365
|
-
code,
|
|
366
|
-
p,
|
|
367
|
-
h1,
|
|
368
|
-
h2,
|
|
369
|
-
h3,
|
|
370
|
-
h4,
|
|
371
|
-
h5 {
|
|
372
|
-
page-break-inside: avoid;
|
|
373
|
-
}
|
|
1
|
+
:root {
|
|
2
|
+
/* -- Standard margins */
|
|
3
|
+
--top-margin: 0.5em;
|
|
4
|
+
--bottom-margin: 0.5em;
|
|
5
|
+
--left-margin: 1.5em;
|
|
6
|
+
|
|
7
|
+
/* -- Small margins */
|
|
8
|
+
--left-margin-small: 1em;
|
|
9
|
+
|
|
10
|
+
/* -- Big margins */
|
|
11
|
+
--left-margin-big: 2em;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
/* Document */
|
|
15
|
+
html {
|
|
16
|
+
font-size: 12px;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
body {
|
|
20
|
+
margin: 0;
|
|
21
|
+
padding: 0;
|
|
22
|
+
font-family: "Segoe UI", "Ubuntu", "DejaVu Sans", "Liberation Sans", "Arial",
|
|
23
|
+
"sans-serif";
|
|
24
|
+
color: #333;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/* Headers and paragraphs */
|
|
28
|
+
h1,
|
|
29
|
+
h2,
|
|
30
|
+
h3,
|
|
31
|
+
h4,
|
|
32
|
+
h5 {
|
|
33
|
+
color: #333;
|
|
34
|
+
font-weight: 600;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
h1 {
|
|
38
|
+
margin-top: 0;
|
|
39
|
+
margin-bottom: var(--bottom-margin);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
h2,
|
|
43
|
+
h3,
|
|
44
|
+
h4,
|
|
45
|
+
h5,
|
|
46
|
+
p {
|
|
47
|
+
margin-top: var(--top-margin);
|
|
48
|
+
margin-bottom: 0;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
h1 {
|
|
52
|
+
font-size: 2.4rem;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
h2 {
|
|
56
|
+
font-size: 2rem;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
h3 {
|
|
60
|
+
font-size: 1.6rem;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
h4 {
|
|
64
|
+
font-size: 1.4rem;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
h5 {
|
|
68
|
+
font-size: 1.2rem;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
p {
|
|
72
|
+
font-size: 1rem;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/* Links */
|
|
76
|
+
a {
|
|
77
|
+
color: #09f;
|
|
78
|
+
margin: 0;
|
|
79
|
+
vertical-align: baseline;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
/* Lists */
|
|
83
|
+
ul,
|
|
84
|
+
ol {
|
|
85
|
+
font-size: 1rem;
|
|
86
|
+
padding: 0;
|
|
87
|
+
margin-top: var(--top-margin);
|
|
88
|
+
margin-right: 0;
|
|
89
|
+
margin-bottom: var(--bottom-margin);
|
|
90
|
+
margin-left: var(--left-margin-big);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
ul ol,
|
|
94
|
+
ol ul,
|
|
95
|
+
ol ol,
|
|
96
|
+
ul ul {
|
|
97
|
+
margin-top: 0;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
li {
|
|
101
|
+
margin-top: var(--top-margin);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
/* Code blocks */
|
|
105
|
+
pre {
|
|
106
|
+
padding: 0;
|
|
107
|
+
white-space: pre-wrap;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
code {
|
|
111
|
+
font-family: "JetBrains Mono", "Consolas", "Ubuntu Mono", "DejaVu Sans Mono",
|
|
112
|
+
"Liberation Mono", "Courier New", monospace;
|
|
113
|
+
font-size: 1rem;
|
|
114
|
+
background-color: #eee;
|
|
115
|
+
padding-left: 0.4em;
|
|
116
|
+
padding-right: 0.4em;
|
|
117
|
+
display: inline-block;
|
|
118
|
+
border-radius: 0.3em;
|
|
119
|
+
line-height: 1.5;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
h1 code,
|
|
123
|
+
h2 code,
|
|
124
|
+
h3 code,
|
|
125
|
+
h4 code,
|
|
126
|
+
h5 code {
|
|
127
|
+
font-size: 0.8em;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
/* Quotes */
|
|
131
|
+
blockquote {
|
|
132
|
+
margin-top: var(--top-margin);
|
|
133
|
+
margin-left: var(--left-margin);
|
|
134
|
+
border-left: 4px solid #ccc;
|
|
135
|
+
padding-left: 0.5em;
|
|
136
|
+
color: #666;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
blockquote > blockquote {
|
|
140
|
+
margin-left: var(--left-margin-small);
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
/* Figures */
|
|
144
|
+
img {
|
|
145
|
+
display: block;
|
|
146
|
+
margin: 2em auto 1em auto;
|
|
147
|
+
max-width: 80%;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
/* -- Figure footer */
|
|
151
|
+
p > img + em {
|
|
152
|
+
text-align: center;
|
|
153
|
+
font-size: 1rem;
|
|
154
|
+
font-style: italic;
|
|
155
|
+
color: #666;
|
|
156
|
+
display: block;
|
|
157
|
+
margin: 1em auto 2em;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
/* Tables */
|
|
161
|
+
table {
|
|
162
|
+
font-size: 1rem;
|
|
163
|
+
font-family: inherit;
|
|
164
|
+
border-collapse: collapse;
|
|
165
|
+
margin-top: var(--top-margin);
|
|
166
|
+
text-align: left;
|
|
167
|
+
table-layout: auto;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
thead {
|
|
171
|
+
background-color: #eee;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
tbody {
|
|
175
|
+
color: #666;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
th,
|
|
179
|
+
td {
|
|
180
|
+
padding: 0.5em 0.75em;
|
|
181
|
+
border: 1px solid #ccc;
|
|
182
|
+
white-space: nowrap;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
col {
|
|
186
|
+
width: auto;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
/* Page breaks */
|
|
190
|
+
.pagebreak {
|
|
191
|
+
clear: both;
|
|
192
|
+
page-break-after: always;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
.pagebreak + * {
|
|
196
|
+
margin-top: 0;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
section,
|
|
200
|
+
ol,
|
|
201
|
+
ul,
|
|
202
|
+
table,
|
|
203
|
+
blockquote,
|
|
204
|
+
code,
|
|
205
|
+
p,
|
|
206
|
+
h1,
|
|
207
|
+
h2,
|
|
208
|
+
h3,
|
|
209
|
+
h4,
|
|
210
|
+
h5 {
|
|
211
|
+
page-break-inside: avoid;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
/* Increase vertical padding for math elements with display=block */
|
|
215
|
+
math[display="block"] {
|
|
216
|
+
margin-top: 1em;
|
|
217
|
+
margin-bottom: 1em;
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
math {
|
|
221
|
+
text-rendering: optimizeLegibility;
|
|
222
|
+
font-family: "Latin Modern Math", "Cambria Math", serif;
|
|
223
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"""
|
|
2
|
+
This module contains the constants used in the markdown_convert package.
|
|
3
|
+
Author: @julynx
|
|
4
|
+
"""
|
|
5
|
+
|
|
6
|
+
RED = "31"
|
|
7
|
+
GREEN = "32"
|
|
8
|
+
YELLOW = "33"
|
|
9
|
+
BLUE = "34"
|
|
10
|
+
MAGENTA = "35"
|
|
11
|
+
CYAN = "36"
|
|
12
|
+
|
|
13
|
+
OPTIONS = ("markdown_file_path", "--mode", "--css", "--out", "-h", "--help")
|
|
14
|
+
|
|
15
|
+
OPTIONS_MODES = ("once", "live", "debug")
|
|
16
|
+
|
|
17
|
+
MARKDOWN_EXTENSIONS = {
|
|
18
|
+
"fenced-code-blocks": None,
|
|
19
|
+
"header-ids": True,
|
|
20
|
+
"breaks": {"on_newline": True},
|
|
21
|
+
"tables": True,
|
|
22
|
+
"latex": True,
|
|
23
|
+
"mermaid": None,
|
|
24
|
+
"strike": None,
|
|
25
|
+
}
|