comrak-ext 0.1.5__cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.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.
- comrak/__init__.py +5 -0
- comrak/__init__.pyi +512 -0
- comrak/comrak.cpython-39-x86_64-linux-gnu.so +0 -0
- comrak/py.typed +0 -0
- comrak_ext-0.1.5.dist-info/METADATA +150 -0
- comrak_ext-0.1.5.dist-info/RECORD +8 -0
- comrak_ext-0.1.5.dist-info/WHEEL +5 -0
- comrak_ext-0.1.5.dist-info/licenses/LICENSE +203 -0
comrak/__init__.py
ADDED
comrak/__init__.pyi
ADDED
|
@@ -0,0 +1,512 @@
|
|
|
1
|
+
from typing import Optional, Generic, TypeVar
|
|
2
|
+
from enum import Enum
|
|
3
|
+
|
|
4
|
+
T = TypeVar("T")
|
|
5
|
+
|
|
6
|
+
class NodeValue(Generic[T]):
|
|
7
|
+
pass
|
|
8
|
+
|
|
9
|
+
class HeexNode(Generic[T]):
|
|
10
|
+
pass
|
|
11
|
+
|
|
12
|
+
class ListDelimType(Enum):
|
|
13
|
+
Period = 1
|
|
14
|
+
Paren = 2
|
|
15
|
+
|
|
16
|
+
class ListType(Enum):
|
|
17
|
+
Bullet = 1
|
|
18
|
+
Ordered = 2
|
|
19
|
+
|
|
20
|
+
class TableAlignment(Enum):
|
|
21
|
+
None_ = 1
|
|
22
|
+
Left = 2
|
|
23
|
+
Center = 3
|
|
24
|
+
Right = 4
|
|
25
|
+
|
|
26
|
+
class AlertType(Enum):
|
|
27
|
+
Note = 1
|
|
28
|
+
Tip = 2
|
|
29
|
+
Important = 3
|
|
30
|
+
Warning = 4
|
|
31
|
+
Caution = 5
|
|
32
|
+
|
|
33
|
+
class ListStyleType(Enum):
|
|
34
|
+
Dash = 45
|
|
35
|
+
Plus = 43
|
|
36
|
+
Star = 42
|
|
37
|
+
|
|
38
|
+
class NodeCode:
|
|
39
|
+
num_backticks: int
|
|
40
|
+
literal: str
|
|
41
|
+
def __init__(self, num_backticks: int, literal: str) -> None: ...
|
|
42
|
+
|
|
43
|
+
class NodeHtmlBlock:
|
|
44
|
+
block_type: int
|
|
45
|
+
literal: str
|
|
46
|
+
def __init__(self, block_type: int, literal: str) -> None: ...
|
|
47
|
+
|
|
48
|
+
class NodeList:
|
|
49
|
+
list_type: ListType
|
|
50
|
+
marker_offset: int
|
|
51
|
+
padding: int
|
|
52
|
+
start: int
|
|
53
|
+
delimiter: ListDelimType
|
|
54
|
+
bullet_char: int
|
|
55
|
+
tight: bool
|
|
56
|
+
is_task_list: bool
|
|
57
|
+
def __init__(
|
|
58
|
+
self,
|
|
59
|
+
list_type: ListType,
|
|
60
|
+
marker_offset: int,
|
|
61
|
+
padding: int,
|
|
62
|
+
start: int,
|
|
63
|
+
delimiter: ListDelimType,
|
|
64
|
+
bullet_char: int,
|
|
65
|
+
tight: bool,
|
|
66
|
+
is_task_list: bool,
|
|
67
|
+
) -> None: ...
|
|
68
|
+
|
|
69
|
+
class NodeDescriptionItem:
|
|
70
|
+
marker_offset: int
|
|
71
|
+
padding: int
|
|
72
|
+
tight: bool
|
|
73
|
+
def __init__(self, marker_offset: int, padding: int, tight: bool) -> None: ...
|
|
74
|
+
|
|
75
|
+
class NodeCodeBlock:
|
|
76
|
+
fenced: bool
|
|
77
|
+
fence_char: int
|
|
78
|
+
fence_length: int
|
|
79
|
+
fence_offset: int
|
|
80
|
+
info: str
|
|
81
|
+
literal: str
|
|
82
|
+
closed: bool
|
|
83
|
+
def __init__(
|
|
84
|
+
self,
|
|
85
|
+
fenced: bool,
|
|
86
|
+
fence_char: int,
|
|
87
|
+
fence_length: int,
|
|
88
|
+
fence_offset: int,
|
|
89
|
+
info: str,
|
|
90
|
+
literal: str,
|
|
91
|
+
closed: bool,
|
|
92
|
+
) -> None: ...
|
|
93
|
+
|
|
94
|
+
class NodeHeading:
|
|
95
|
+
level: int
|
|
96
|
+
setext: bool
|
|
97
|
+
closed: bool
|
|
98
|
+
def __init__(self, level: int, setext: bool, closed: bool) -> None: ...
|
|
99
|
+
|
|
100
|
+
class NodeTable:
|
|
101
|
+
alignments: list[TableAlignment]
|
|
102
|
+
num_columns: int
|
|
103
|
+
num_rows: int
|
|
104
|
+
num_nonempty_cells: int
|
|
105
|
+
def __init__(
|
|
106
|
+
self,
|
|
107
|
+
alignments: list[TableAlignment] | None,
|
|
108
|
+
num_columns: int,
|
|
109
|
+
num_rows: int,
|
|
110
|
+
num_nonempty_cells: int,
|
|
111
|
+
) -> None: ...
|
|
112
|
+
|
|
113
|
+
class NodeTaskItem:
|
|
114
|
+
symbol: Optional[str]
|
|
115
|
+
symbol_sourcepos: Sourcepos
|
|
116
|
+
def __init__(self, symbol: Optional[str], symbol_sourcepos: Sourcepos) -> None: ...
|
|
117
|
+
|
|
118
|
+
class NodeLink:
|
|
119
|
+
url: str
|
|
120
|
+
title: str
|
|
121
|
+
def __init__(self, url: str, title: str) -> None: ...
|
|
122
|
+
|
|
123
|
+
class NodeFootnoteDefinition:
|
|
124
|
+
name: str
|
|
125
|
+
total_references: int
|
|
126
|
+
def __init__(self, name: str, total_references: int) -> None: ...
|
|
127
|
+
|
|
128
|
+
class NodeFootnoteReference:
|
|
129
|
+
name: str
|
|
130
|
+
texts: list[tuple[str, int]]
|
|
131
|
+
ref_num: int
|
|
132
|
+
ix: int
|
|
133
|
+
def __init__(
|
|
134
|
+
self, name: str, texts: list[tuple[str, int]], ref_num: int, ix: int
|
|
135
|
+
) -> None: ...
|
|
136
|
+
|
|
137
|
+
class NodeWikiLink:
|
|
138
|
+
url: str
|
|
139
|
+
def __init__(self, url: str) -> None: ...
|
|
140
|
+
|
|
141
|
+
class NodeShortCode:
|
|
142
|
+
code: str
|
|
143
|
+
emoji: str
|
|
144
|
+
def __init__(self, code: str, emoji: str) -> None: ...
|
|
145
|
+
|
|
146
|
+
class NodeMath:
|
|
147
|
+
dollar_math: bool
|
|
148
|
+
display_math: bool
|
|
149
|
+
literal: str
|
|
150
|
+
def __init__(self, dollar_math: bool, display_math: bool, literal: str) -> None: ...
|
|
151
|
+
|
|
152
|
+
class NodeMultilineBlockQuote:
|
|
153
|
+
fence_length: int
|
|
154
|
+
fence_offset: int
|
|
155
|
+
def __init__(self, fence_length: int, fence_offset: int) -> None: ...
|
|
156
|
+
|
|
157
|
+
class NodeAlert:
|
|
158
|
+
alert_type: AlertType
|
|
159
|
+
title: Optional[str]
|
|
160
|
+
multiline: bool
|
|
161
|
+
fence_length: int
|
|
162
|
+
fence_offset: int
|
|
163
|
+
def __init__(
|
|
164
|
+
self,
|
|
165
|
+
alert_type: AlertType,
|
|
166
|
+
title: Optional[str],
|
|
167
|
+
multiline: bool,
|
|
168
|
+
fence_length: int,
|
|
169
|
+
fence_offset: int,
|
|
170
|
+
) -> None: ...
|
|
171
|
+
|
|
172
|
+
class HeexNodeDirective(HeexNode[None]):
|
|
173
|
+
def __init__(self) -> None: ...
|
|
174
|
+
|
|
175
|
+
class HeexNodeComment(HeexNode[None]):
|
|
176
|
+
def __init__(self) -> None: ...
|
|
177
|
+
|
|
178
|
+
class HeexNodeMultilineComment(HeexNode[None]):
|
|
179
|
+
def __init__(self) -> None: ...
|
|
180
|
+
|
|
181
|
+
class HeexNodeExpression(HeexNode[None]):
|
|
182
|
+
def __init__(self) -> None: ...
|
|
183
|
+
|
|
184
|
+
class HeexNodeTag(HeexNode[str]):
|
|
185
|
+
tag: str
|
|
186
|
+
def __init__(self, tag: str) -> None: ...
|
|
187
|
+
|
|
188
|
+
class NodeHeexBlock:
|
|
189
|
+
literal: str
|
|
190
|
+
node: HeexNode
|
|
191
|
+
def __init__(self, literal: str, value: HeexNode) -> None: ...
|
|
192
|
+
|
|
193
|
+
class HeexBlock(NodeValue[NodeHeexBlock]):
|
|
194
|
+
value: NodeHeexBlock
|
|
195
|
+
def __init__(self, value: NodeHeexBlock) -> None: ...
|
|
196
|
+
|
|
197
|
+
class HeexInline(NodeValue[str]):
|
|
198
|
+
value: str
|
|
199
|
+
def __init__(self, value: str) -> None: ...
|
|
200
|
+
|
|
201
|
+
class Document(NodeValue[None]):
|
|
202
|
+
def __init__(self) -> None: ...
|
|
203
|
+
|
|
204
|
+
class FrontMatter(NodeValue[str]):
|
|
205
|
+
value: str
|
|
206
|
+
def __init__(self, value: str) -> None: ...
|
|
207
|
+
|
|
208
|
+
class BlockQuote(NodeValue[None]):
|
|
209
|
+
def __init__(self) -> None: ...
|
|
210
|
+
|
|
211
|
+
class List(NodeValue[NodeList]):
|
|
212
|
+
value: NodeList
|
|
213
|
+
def __init__(self, value: NodeList) -> None: ...
|
|
214
|
+
|
|
215
|
+
class Item(NodeValue[NodeList]):
|
|
216
|
+
value: NodeList
|
|
217
|
+
def __init__(self, value: NodeList) -> None: ...
|
|
218
|
+
|
|
219
|
+
class DescriptionList(NodeValue[None]):
|
|
220
|
+
def __init__(self) -> None: ...
|
|
221
|
+
|
|
222
|
+
class DescriptionItem(NodeValue[NodeDescriptionItem]):
|
|
223
|
+
value: NodeDescriptionItem
|
|
224
|
+
def __init__(self, value: NodeDescriptionItem) -> None: ...
|
|
225
|
+
|
|
226
|
+
class DescriptionTerm(NodeValue[None]):
|
|
227
|
+
def __init__(self) -> None: ...
|
|
228
|
+
|
|
229
|
+
class DescriptionDetails(NodeValue[None]):
|
|
230
|
+
def __init__(self) -> None: ...
|
|
231
|
+
|
|
232
|
+
class CodeBlock(NodeValue[NodeCodeBlock]):
|
|
233
|
+
value: NodeCodeBlock
|
|
234
|
+
def __init__(self, value: NodeCodeBlock) -> None: ...
|
|
235
|
+
|
|
236
|
+
class HtmlBlock(NodeValue[NodeHtmlBlock]):
|
|
237
|
+
value: NodeHtmlBlock
|
|
238
|
+
def __init__(self, value: NodeHtmlBlock) -> None: ...
|
|
239
|
+
|
|
240
|
+
class Paragraph(NodeValue[None]):
|
|
241
|
+
def __init__(self) -> None: ...
|
|
242
|
+
|
|
243
|
+
class Heading(NodeValue[NodeHeading]):
|
|
244
|
+
value: NodeHeading
|
|
245
|
+
def __init__(self, value: NodeHeading) -> None: ...
|
|
246
|
+
|
|
247
|
+
class ThematicBreak(NodeValue[None]):
|
|
248
|
+
def __init__(self) -> None: ...
|
|
249
|
+
|
|
250
|
+
class FootnoteDefinition(NodeValue[NodeFootnoteDefinition]):
|
|
251
|
+
value: NodeFootnoteDefinition
|
|
252
|
+
def __init__(self, value: NodeFootnoteDefinition) -> None: ...
|
|
253
|
+
|
|
254
|
+
class Table(NodeValue[NodeTable]):
|
|
255
|
+
value: NodeTable
|
|
256
|
+
def __init__(self, value: NodeTable) -> None: ...
|
|
257
|
+
|
|
258
|
+
class TableRow(NodeValue[bool]):
|
|
259
|
+
value: bool
|
|
260
|
+
def __init__(self, value: bool) -> None: ...
|
|
261
|
+
|
|
262
|
+
class TableCell(NodeValue[None]):
|
|
263
|
+
def __init__(self) -> None: ...
|
|
264
|
+
|
|
265
|
+
class Text(NodeValue[str]):
|
|
266
|
+
value: str
|
|
267
|
+
def __init__(self, value: str) -> None: ...
|
|
268
|
+
|
|
269
|
+
class TaskItem(NodeValue[NodeTaskItem]):
|
|
270
|
+
value: NodeTaskItem
|
|
271
|
+
def __init__(self, value: NodeTaskItem) -> None: ...
|
|
272
|
+
|
|
273
|
+
class SoftBreak(NodeValue[None]):
|
|
274
|
+
def __init__(self) -> None: ...
|
|
275
|
+
|
|
276
|
+
class LineBreak(NodeValue[None]):
|
|
277
|
+
def __init__(self) -> None: ...
|
|
278
|
+
|
|
279
|
+
class Code(NodeValue[NodeCode]):
|
|
280
|
+
value: NodeCode
|
|
281
|
+
def __init__(self, value: NodeCode) -> None: ...
|
|
282
|
+
|
|
283
|
+
class HtmlInline(NodeValue[str]):
|
|
284
|
+
value: str
|
|
285
|
+
def __init__(self, value: str) -> None: ...
|
|
286
|
+
|
|
287
|
+
class Raw(NodeValue[str]):
|
|
288
|
+
value: str
|
|
289
|
+
def __init__(self, value: str) -> None: ...
|
|
290
|
+
|
|
291
|
+
class Emph(NodeValue[None]):
|
|
292
|
+
def __init__(self) -> None: ...
|
|
293
|
+
|
|
294
|
+
class Strong(NodeValue[None]):
|
|
295
|
+
def __init__(self) -> None: ...
|
|
296
|
+
|
|
297
|
+
class Strikethrough(NodeValue[None]):
|
|
298
|
+
def __init__(self) -> None: ...
|
|
299
|
+
|
|
300
|
+
class Highlight(NodeValue[None]):
|
|
301
|
+
def __init__(self) -> None: ...
|
|
302
|
+
|
|
303
|
+
class Superscript(NodeValue[None]):
|
|
304
|
+
def __init__(self) -> None: ...
|
|
305
|
+
|
|
306
|
+
class Link(NodeValue[NodeLink]):
|
|
307
|
+
value: NodeLink
|
|
308
|
+
def __init__(self, value: NodeLink) -> None: ...
|
|
309
|
+
|
|
310
|
+
class Image(NodeValue[NodeLink]):
|
|
311
|
+
value: NodeLink
|
|
312
|
+
def __init__(self, value: NodeLink) -> None: ...
|
|
313
|
+
|
|
314
|
+
class FootnoteReference(NodeValue[NodeFootnoteReference]):
|
|
315
|
+
value: NodeFootnoteReference
|
|
316
|
+
def __init__(self, value: NodeFootnoteReference) -> None: ...
|
|
317
|
+
|
|
318
|
+
class ShortCode(NodeValue[NodeShortCode]):
|
|
319
|
+
value: NodeShortCode
|
|
320
|
+
def __init__(self, value: NodeShortCode) -> None: ...
|
|
321
|
+
|
|
322
|
+
class Math(NodeValue[NodeMath]):
|
|
323
|
+
value: NodeMath
|
|
324
|
+
def __init__(self, value: NodeMath) -> None: ...
|
|
325
|
+
|
|
326
|
+
class MultilineBlockQuote(NodeValue[NodeMultilineBlockQuote]):
|
|
327
|
+
value: NodeMultilineBlockQuote
|
|
328
|
+
def __init__(self, value: NodeMultilineBlockQuote) -> None: ...
|
|
329
|
+
|
|
330
|
+
class Escaped(NodeValue[None]):
|
|
331
|
+
def __init__(self) -> None: ...
|
|
332
|
+
|
|
333
|
+
class WikiLink(NodeValue[NodeWikiLink]):
|
|
334
|
+
value: NodeWikiLink
|
|
335
|
+
def __init__(self, value: NodeWikiLink) -> None: ...
|
|
336
|
+
|
|
337
|
+
class Underline(NodeValue[None]):
|
|
338
|
+
def __init__(self) -> None: ...
|
|
339
|
+
|
|
340
|
+
class Subscript(NodeValue[None]):
|
|
341
|
+
def __init__(self) -> None: ...
|
|
342
|
+
|
|
343
|
+
class SpoileredText(NodeValue[None]):
|
|
344
|
+
def __init__(self) -> None: ...
|
|
345
|
+
|
|
346
|
+
class EscapedTag(NodeValue[str]):
|
|
347
|
+
value: str
|
|
348
|
+
def __init__(self, value: str) -> None: ...
|
|
349
|
+
|
|
350
|
+
class Alert(NodeValue[NodeAlert]):
|
|
351
|
+
value: NodeAlert
|
|
352
|
+
def __init__(self, value: NodeAlert) -> None: ...
|
|
353
|
+
|
|
354
|
+
class Subtext(NodeValue[None]):
|
|
355
|
+
def __init__(self) -> None: ...
|
|
356
|
+
|
|
357
|
+
class LineColumn:
|
|
358
|
+
line: int
|
|
359
|
+
column: int
|
|
360
|
+
def __init__(self, line: int, column: int) -> None: ...
|
|
361
|
+
|
|
362
|
+
class Sourcepos:
|
|
363
|
+
start: LineColumn
|
|
364
|
+
end: LineColumn
|
|
365
|
+
def __init__(self, start: LineColumn, end: LineColumn) -> None: ...
|
|
366
|
+
|
|
367
|
+
class AstNode:
|
|
368
|
+
node_value: NodeValue
|
|
369
|
+
sourcepos: Sourcepos
|
|
370
|
+
parent: Optional[AstNode]
|
|
371
|
+
children: list[AstNode]
|
|
372
|
+
def __init__(
|
|
373
|
+
self,
|
|
374
|
+
node_value: NodeValue,
|
|
375
|
+
sourcepos: Sourcepos,
|
|
376
|
+
parent: Optional[AstNode],
|
|
377
|
+
children: list[AstNode],
|
|
378
|
+
) -> None: ...
|
|
379
|
+
|
|
380
|
+
class ExtensionOptions:
|
|
381
|
+
strikethrough: bool
|
|
382
|
+
tagfilter: bool
|
|
383
|
+
table: bool
|
|
384
|
+
autolink: bool
|
|
385
|
+
tasklist: bool
|
|
386
|
+
superscript: bool
|
|
387
|
+
header_ids: Optional[str]
|
|
388
|
+
footnotes: bool
|
|
389
|
+
inline_footnotes: bool
|
|
390
|
+
description_lists: bool
|
|
391
|
+
front_matter_delimiter: Optional[str]
|
|
392
|
+
multiline_block_quotes: bool
|
|
393
|
+
alerts: bool
|
|
394
|
+
math_dollars: bool
|
|
395
|
+
math_code: bool
|
|
396
|
+
shortcodes: bool
|
|
397
|
+
wikilinks_title_after_pipe: bool
|
|
398
|
+
wikilinks_title_before_pipe: bool
|
|
399
|
+
underline: bool
|
|
400
|
+
subscript: bool
|
|
401
|
+
spoiler: bool
|
|
402
|
+
greentext: bool
|
|
403
|
+
cjk_friendly_emphasis: bool
|
|
404
|
+
subtext: bool
|
|
405
|
+
highlight: bool
|
|
406
|
+
phoenix_heex: bool
|
|
407
|
+
def __init__(
|
|
408
|
+
self,
|
|
409
|
+
strikethrough: bool = False,
|
|
410
|
+
tagfilter: bool = False,
|
|
411
|
+
table: bool = False,
|
|
412
|
+
autolink: bool = False,
|
|
413
|
+
tasklist: bool = False,
|
|
414
|
+
superscript: bool = False,
|
|
415
|
+
header_ids: Optional[str] = None,
|
|
416
|
+
footnotes: bool = False,
|
|
417
|
+
inline_footnotes: bool = False,
|
|
418
|
+
description_lists: bool = False,
|
|
419
|
+
front_matter_delimiter: Optional[str] = None,
|
|
420
|
+
multiline_block_quotes: bool = False,
|
|
421
|
+
alerts: bool = False,
|
|
422
|
+
math_dollars: bool = False,
|
|
423
|
+
math_code: bool = False,
|
|
424
|
+
shortcodes: bool = False,
|
|
425
|
+
wikilinks_title_after_pipe: bool = False,
|
|
426
|
+
wikilinks_title_before_pipe: bool = False,
|
|
427
|
+
underline: bool = False,
|
|
428
|
+
subscript: bool = False,
|
|
429
|
+
spoiler: bool = False,
|
|
430
|
+
greentext: bool = False,
|
|
431
|
+
cjk_friendly_emphasis: bool = False,
|
|
432
|
+
subtext: bool = False,
|
|
433
|
+
highlight: bool = False,
|
|
434
|
+
phoenix_heex: bool = False,
|
|
435
|
+
) -> None: ...
|
|
436
|
+
|
|
437
|
+
class ParseOptions:
|
|
438
|
+
smart: bool
|
|
439
|
+
default_info_string: Optional[str]
|
|
440
|
+
relaxed_tasklist_matching: bool
|
|
441
|
+
tasklist_in_table: bool
|
|
442
|
+
relaxed_autolinks: bool
|
|
443
|
+
ignore_setext: bool
|
|
444
|
+
leave_footnote_definitions: bool
|
|
445
|
+
escaped_char_spans: bool
|
|
446
|
+
def __init__(
|
|
447
|
+
self,
|
|
448
|
+
smart: bool = False,
|
|
449
|
+
default_info_string: Optional[str] = None,
|
|
450
|
+
relaxed_tasklist_matching: bool = False,
|
|
451
|
+
tasklist_in_table: bool = False,
|
|
452
|
+
relaxed_autolinks: bool = False,
|
|
453
|
+
ignore_setext: bool = False,
|
|
454
|
+
leave_footnote_definitions: bool = False,
|
|
455
|
+
escaped_char_spans: bool = False,
|
|
456
|
+
) -> None: ...
|
|
457
|
+
|
|
458
|
+
class RenderOptions:
|
|
459
|
+
hardbreaks: bool
|
|
460
|
+
github_pre_lang: bool
|
|
461
|
+
full_info_string: bool
|
|
462
|
+
width: int
|
|
463
|
+
unsafe_: bool
|
|
464
|
+
escape: bool
|
|
465
|
+
list_style: ListStyleType
|
|
466
|
+
sourcepos: bool
|
|
467
|
+
escaped_char_spans: bool
|
|
468
|
+
ignore_empty_links: bool
|
|
469
|
+
gfm_quirks: bool
|
|
470
|
+
prefer_fenced: bool
|
|
471
|
+
figure_with_caption: bool
|
|
472
|
+
tasklist_classes: bool
|
|
473
|
+
ol_width: int
|
|
474
|
+
experimental_minimize_commonmark: bool
|
|
475
|
+
def __init__(
|
|
476
|
+
self,
|
|
477
|
+
hardbreaks: bool = False,
|
|
478
|
+
github_pre_lang: bool = False,
|
|
479
|
+
full_info_string: bool = False,
|
|
480
|
+
width: int = 0,
|
|
481
|
+
unsafe_: bool = False,
|
|
482
|
+
escape: bool = False,
|
|
483
|
+
list_style: ListStyleType = ListStyleType.Dash,
|
|
484
|
+
sourcepos: bool = False,
|
|
485
|
+
escaped_char_spans: bool = False,
|
|
486
|
+
ignore_empty_links: bool = False,
|
|
487
|
+
gfm_quirks: bool = False,
|
|
488
|
+
prefer_fenced: bool = False,
|
|
489
|
+
figure_with_caption: bool = False,
|
|
490
|
+
tasklist_classes: bool = False,
|
|
491
|
+
ol_width: int = 0,
|
|
492
|
+
experimental_minimize_commonmark: bool = False,
|
|
493
|
+
) -> None: ...
|
|
494
|
+
|
|
495
|
+
def markdown_to_html(
|
|
496
|
+
text: str,
|
|
497
|
+
extension_options: Optional[ExtensionOptions] = None,
|
|
498
|
+
parse_options: Optional[ParseOptions] = None,
|
|
499
|
+
render_options: Optional[RenderOptions] = None,
|
|
500
|
+
) -> str: ...
|
|
501
|
+
def markdown_to_commonmark(
|
|
502
|
+
text: str,
|
|
503
|
+
extension_options: Optional[ExtensionOptions] = None,
|
|
504
|
+
parse_options: Optional[ParseOptions] = None,
|
|
505
|
+
render_options: Optional[RenderOptions] = None,
|
|
506
|
+
) -> str: ...
|
|
507
|
+
def parse_document(
|
|
508
|
+
text: str,
|
|
509
|
+
extension_options: Optional[ExtensionOptions] = None,
|
|
510
|
+
parse_options: Optional[ParseOptions] = None,
|
|
511
|
+
render_options: Optional[RenderOptions] = None,
|
|
512
|
+
) -> AstNode: ...
|
|
Binary file
|
comrak/py.typed
ADDED
|
File without changes
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: comrak-ext
|
|
3
|
+
Version: 0.1.5
|
|
4
|
+
Classifier: Intended Audience :: Developers
|
|
5
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
6
|
+
Classifier: Programming Language :: Rust
|
|
7
|
+
Classifier: Programming Language :: Python :: Implementation :: CPython
|
|
8
|
+
Classifier: Programming Language :: Python :: Implementation :: PyPy
|
|
9
|
+
Classifier: Operating System :: OS Independent
|
|
10
|
+
Classifier: Programming Language :: Python :: 3
|
|
11
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
12
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
16
|
+
Requires-Dist: markdown>=3.7 ; extra == 'bench'
|
|
17
|
+
Requires-Dist: markdown2>=2.5.3 ; extra == 'bench'
|
|
18
|
+
Requires-Dist: maturin[patchelf]>=1.8.2 ; extra == 'dev'
|
|
19
|
+
Requires-Dist: pdm>=2.22.3 ; extra == 'dev'
|
|
20
|
+
Requires-Dist: pdm-bump>=0.9.10 ; extra == 'dev'
|
|
21
|
+
Requires-Dist: pre-commit>=4.1.0 ; extra == 'dev'
|
|
22
|
+
Provides-Extra: bench
|
|
23
|
+
Provides-Extra: dev
|
|
24
|
+
License-File: LICENSE
|
|
25
|
+
Summary: Extended Python bindings for the Comrak Rust library, a fast CommonMark/GFM parser
|
|
26
|
+
Keywords: markdown,html,rust,commonmark,gfm,parser
|
|
27
|
+
Author-email: Martin Chrástek <chrastek12@gmail.com>
|
|
28
|
+
Requires-Python: >=3.9
|
|
29
|
+
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
|
|
30
|
+
Project-URL: Homepage, https://github.com/Martin005/comrak-ext
|
|
31
|
+
Project-URL: Repository, https://github.com/Martin005/comrak-ext.git
|
|
32
|
+
|
|
33
|
+
# comrak-ext
|
|
34
|
+
|
|
35
|
+
<!-- [](https://pepy.tech/project/comrak-ext) -->
|
|
36
|
+
[](https://github.com/astral-sh/uv)
|
|
37
|
+
[](https://pdm.fming.dev)
|
|
38
|
+
[](https://pypi.org/project/comrak-ext)
|
|
39
|
+
[](https://pypi.org/project/comrak-ext)
|
|
40
|
+
[](https://pypi.python.org/pypi/comrak-ext)
|
|
41
|
+
[](https://results.pre-commit.ci/latest/github/Martin005/comrak-ext/master)
|
|
42
|
+
|
|
43
|
+
Extended Python bindings for the Comrak Rust library, a fast CommonMark/GFM parser. Fork of [lmmx/comrak](https://github.com/lmmx/comrak).
|
|
44
|
+
|
|
45
|
+
## Installation
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
pip install comrak-ext
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
### Requirements
|
|
52
|
+
|
|
53
|
+
- Python 3.9+
|
|
54
|
+
|
|
55
|
+
## Features
|
|
56
|
+
|
|
57
|
+
Fast Markdown to HTML parser in Rust, shipped for Python via PyO3.
|
|
58
|
+
|
|
59
|
+
## API
|
|
60
|
+
|
|
61
|
+
### `markdown_to_html`
|
|
62
|
+
|
|
63
|
+
Render Markdown to HTML:
|
|
64
|
+
|
|
65
|
+
```python
|
|
66
|
+
from comrak import ExtensionOptions, markdown_to_html
|
|
67
|
+
extension_options = ExtensionOptions()
|
|
68
|
+
markdown_to_html("foo :smile:", extension_options)
|
|
69
|
+
# '<p>foo :smile:</p>\n'
|
|
70
|
+
|
|
71
|
+
extension_options.shortcodes = True
|
|
72
|
+
markdown_to_html("foo :smile:", extension_options)
|
|
73
|
+
# '<p>foo 😄</p>\n'
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
### `markdown_to_commonmark`
|
|
77
|
+
|
|
78
|
+
Render Markdown to CommonMark:
|
|
79
|
+
|
|
80
|
+
```python
|
|
81
|
+
from comrak import RenderOptions, ListStyleType, markdown_to_commonmark
|
|
82
|
+
|
|
83
|
+
render_options = RenderOptions()
|
|
84
|
+
markdown_to_commonmark("- one\n- two\n- three", render_options=render_options)
|
|
85
|
+
|
|
86
|
+
# '- one\n- two\n- three\n' – default is Dash
|
|
87
|
+
render_options.list_style = ListStyleType.Plus
|
|
88
|
+
markdown_to_commonmark("- one\n- two\n- three", render_options=render_options)
|
|
89
|
+
# '+ one\n+ two\n+ three\n'
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
### `parse_document`
|
|
93
|
+
|
|
94
|
+
Parse Markdown into an abstract syntax tree (AST):
|
|
95
|
+
|
|
96
|
+
```python
|
|
97
|
+
from comrak import ExtensionOptions, Document, Text, Paragraph, parse_document
|
|
98
|
+
|
|
99
|
+
extension_options = ExtensionOptions(front_matter_delimiter = "---")
|
|
100
|
+
|
|
101
|
+
md_content = """---
|
|
102
|
+
This is a text in FrontMatter
|
|
103
|
+
---
|
|
104
|
+
|
|
105
|
+
Hello, Markdown!
|
|
106
|
+
"""
|
|
107
|
+
|
|
108
|
+
x = parse_document(md_content, extension_options)
|
|
109
|
+
assert isinstance(x.node_value, Document)
|
|
110
|
+
assert not hasattr(x.node_value, "value")
|
|
111
|
+
assert len(x.children) == 2
|
|
112
|
+
|
|
113
|
+
assert isinstance(x.children[0].node_value, FrontMatter)
|
|
114
|
+
assert isinstance(x.children[0].node_value.value, str)
|
|
115
|
+
assert x.children[0].node_value.value.strip() == "---\nThis is a text in FrontMatter\n---"
|
|
116
|
+
|
|
117
|
+
assert isinstance(x.children[1].node_value, Paragraph)
|
|
118
|
+
assert len(x.children[1].children) == 1
|
|
119
|
+
assert isinstance(x.children[1].children[0].node_value, Text)
|
|
120
|
+
assert isinstance(x.children[1].children[0].node_value.value, str)
|
|
121
|
+
assert x.children[1].children[0].node_value.value == "Hello, Markdown!"
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
### Options
|
|
125
|
+
|
|
126
|
+
All options are exposed in a simple manner and can be used with `markdown_to_html`, `markdown_to_commonmark`, and `parse_document`.
|
|
127
|
+
|
|
128
|
+
Refer to the [Comrak docs](https://docs.rs/comrak/latest/comrak/struct.Options.html) for all available options.
|
|
129
|
+
|
|
130
|
+
## Benchmarks
|
|
131
|
+
|
|
132
|
+
Tested with small (8 lines) and medium (1200 lines) markdown strings
|
|
133
|
+
|
|
134
|
+
- vs. [markdown](https://pypi.org/project/markdown): 15x faster (S/M)
|
|
135
|
+
- vs. [markdown2](https://pypi.org/project/markdown2): 20x (S) - 60x (M) faster
|
|
136
|
+
|
|
137
|
+
## Contributing
|
|
138
|
+
|
|
139
|
+
Maintained by [Martin005](https://github.com/Martin005). Contributions welcome!
|
|
140
|
+
|
|
141
|
+
1. **Issues & Discussions**: Please open a GitHub issue or discussion for bugs, feature requests, or questions.
|
|
142
|
+
2. **Pull Requests**: PRs are welcome!
|
|
143
|
+
- Install the dev extra (e.g. with [uv](https://docs.astral.sh/uv/): `uv pip install -e .[dev]`)
|
|
144
|
+
- Run tests (when available) and include updates to docs or examples if relevant.
|
|
145
|
+
- If reporting a bug, please include the version and the error message/traceback if available.
|
|
146
|
+
|
|
147
|
+
## License
|
|
148
|
+
|
|
149
|
+
Licensed under the 2-Clause BSD License. See [LICENSE](https://github.com/Martin005/comrak-ext/blob/master/LICENSE) for all the details.
|
|
150
|
+
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
comrak/__init__.py,sha256=H-lprYD1Pf1TgIMrspnMxaKc6nzSR58I8zQEItFxzJg,107
|
|
2
|
+
comrak/__init__.pyi,sha256=oa-ERKBnZ5DSc2MMxmTyw4HDprcsjaV1Hzko3TPY0cI,13282
|
|
3
|
+
comrak/comrak.cpython-39-x86_64-linux-gnu.so,sha256=OJTC4_X4gwBfHilagA5FgeIHvyf_UyuV31yptCTWZag,2431112
|
|
4
|
+
comrak/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
5
|
+
comrak_ext-0.1.5.dist-info/METADATA,sha256=jp8SfEIWOzwR8mRo-aSAM20hto9NjxqtnOMBP1xfwHk,5606
|
|
6
|
+
comrak_ext-0.1.5.dist-info/WHEEL,sha256=0pTCIiZY9L7sPiSO8mlccAMQNPlJMOQJBNbB3razfV0,143
|
|
7
|
+
comrak_ext-0.1.5.dist-info/licenses/LICENSE,sha256=Oph2Y_Nxhg7i9L9t1bW3LdtMQJNkIl5tDKLqmNnFnCs,8986
|
|
8
|
+
comrak_ext-0.1.5.dist-info/RECORD,,
|
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
Copyright (c) 2017–2024, Asherah Connor and Comrak contributors
|
|
2
|
+
|
|
3
|
+
All rights reserved.
|
|
4
|
+
|
|
5
|
+
Redistribution and use in source and binary forms, with or without
|
|
6
|
+
modification, are permitted provided that the following conditions are met:
|
|
7
|
+
|
|
8
|
+
* Redistributions of source code must retain the above copyright
|
|
9
|
+
notice, this list of conditions and the following disclaimer.
|
|
10
|
+
|
|
11
|
+
* Redistributions in binary form must reproduce the above
|
|
12
|
+
copyright notice, this list of conditions and the following
|
|
13
|
+
disclaimer in the documentation and/or other materials provided
|
|
14
|
+
with the distribution.
|
|
15
|
+
|
|
16
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
17
|
+
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
18
|
+
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
|
19
|
+
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
|
20
|
+
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
21
|
+
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
|
22
|
+
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
23
|
+
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
|
24
|
+
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
25
|
+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
26
|
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
27
|
+
|
|
28
|
+
-----
|
|
29
|
+
|
|
30
|
+
cmark-gfm
|
|
31
|
+
|
|
32
|
+
derived from https://github.com/github/cmark
|
|
33
|
+
|
|
34
|
+
Copyright (c) 2014, John MacFarlane
|
|
35
|
+
|
|
36
|
+
All rights reserved.
|
|
37
|
+
|
|
38
|
+
Redistribution and use in source and binary forms, with or without
|
|
39
|
+
modification, are permitted provided that the following conditions are met:
|
|
40
|
+
|
|
41
|
+
* Redistributions of source code must retain the above copyright
|
|
42
|
+
notice, this list of conditions and the following disclaimer.
|
|
43
|
+
|
|
44
|
+
* Redistributions in binary form must reproduce the above
|
|
45
|
+
copyright notice, this list of conditions and the following
|
|
46
|
+
disclaimer in the documentation and/or other materials provided
|
|
47
|
+
with the distribution.
|
|
48
|
+
|
|
49
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
50
|
+
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
51
|
+
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
|
52
|
+
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
|
53
|
+
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
54
|
+
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
|
55
|
+
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
56
|
+
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
|
57
|
+
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
58
|
+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
59
|
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
60
|
+
|
|
61
|
+
-----
|
|
62
|
+
|
|
63
|
+
houdini.h, houdini_href_e.c, houdini_html_e.c, houdini_html_u.c
|
|
64
|
+
|
|
65
|
+
derive from https://github.com/vmg/houdini (with some modifications)
|
|
66
|
+
|
|
67
|
+
Copyright (C) 2012 Vicent Martí
|
|
68
|
+
|
|
69
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
70
|
+
this software and associated documentation files (the "Software"), to deal in
|
|
71
|
+
the Software without restriction, including without limitation the rights to
|
|
72
|
+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
|
73
|
+
of the Software, and to permit persons to whom the Software is furnished to do
|
|
74
|
+
so, subject to the following conditions:
|
|
75
|
+
|
|
76
|
+
The above copyright notice and this permission notice shall be included in all
|
|
77
|
+
copies or substantial portions of the Software.
|
|
78
|
+
|
|
79
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
80
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
81
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
82
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
83
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
84
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
85
|
+
SOFTWARE.
|
|
86
|
+
|
|
87
|
+
-----
|
|
88
|
+
|
|
89
|
+
buffer.h, buffer.c, chunk.h
|
|
90
|
+
|
|
91
|
+
are derived from code (C) 2012 Github, Inc.
|
|
92
|
+
|
|
93
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
94
|
+
this software and associated documentation files (the "Software"), to deal in
|
|
95
|
+
the Software without restriction, including without limitation the rights to
|
|
96
|
+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
|
97
|
+
of the Software, and to permit persons to whom the Software is furnished to do
|
|
98
|
+
so, subject to the following conditions:
|
|
99
|
+
|
|
100
|
+
The above copyright notice and this permission notice shall be included in all
|
|
101
|
+
copies or substantial portions of the Software.
|
|
102
|
+
|
|
103
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
104
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
105
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
106
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
107
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
108
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
109
|
+
SOFTWARE.
|
|
110
|
+
|
|
111
|
+
-----
|
|
112
|
+
|
|
113
|
+
utf8.c and utf8.c
|
|
114
|
+
|
|
115
|
+
are derived from utf8proc
|
|
116
|
+
(<http://www.public-software-group.org/utf8proc>),
|
|
117
|
+
(C) 2009 Public Software Group e. V., Berlin, Germany.
|
|
118
|
+
|
|
119
|
+
Permission is hereby granted, free of charge, to any person obtaining a
|
|
120
|
+
copy of this software and associated documentation files (the "Software"),
|
|
121
|
+
to deal in the Software without restriction, including without limitation
|
|
122
|
+
the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
|
123
|
+
and/or sell copies of the Software, and to permit persons to whom the
|
|
124
|
+
Software is furnished to do so, subject to the following conditions:
|
|
125
|
+
|
|
126
|
+
The above copyright notice and this permission notice shall be included in
|
|
127
|
+
all copies or substantial portions of the Software.
|
|
128
|
+
|
|
129
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
130
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
131
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
132
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
133
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
134
|
+
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
|
135
|
+
DEALINGS IN THE SOFTWARE.
|
|
136
|
+
|
|
137
|
+
-----
|
|
138
|
+
|
|
139
|
+
The normalization code in normalize.py was derived from the
|
|
140
|
+
markdowntest project, Copyright 2013 Karl Dubost:
|
|
141
|
+
|
|
142
|
+
The MIT License (MIT)
|
|
143
|
+
|
|
144
|
+
Copyright (c) 2013 Karl Dubost
|
|
145
|
+
|
|
146
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
|
147
|
+
a copy of this software and associated documentation files (the
|
|
148
|
+
"Software"), to deal in the Software without restriction, including
|
|
149
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
|
150
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
|
151
|
+
permit persons to whom the Software is furnished to do so, subject to
|
|
152
|
+
the following conditions:
|
|
153
|
+
|
|
154
|
+
The above copyright notice and this permission notice shall be
|
|
155
|
+
included in all copies or substantial portions of the Software.
|
|
156
|
+
|
|
157
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
158
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
159
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
160
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
|
161
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
162
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
|
163
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
164
|
+
|
|
165
|
+
-----
|
|
166
|
+
|
|
167
|
+
The CommonMark spec (test/spec.txt) is
|
|
168
|
+
|
|
169
|
+
Copyright (C) 2014-15 John MacFarlane
|
|
170
|
+
|
|
171
|
+
Released under the Creative Commons CC-BY-SA 4.0 license:
|
|
172
|
+
<http://creativecommons.org/licenses/by-sa/4.0/>.
|
|
173
|
+
|
|
174
|
+
-----
|
|
175
|
+
|
|
176
|
+
The test software in test/ is
|
|
177
|
+
|
|
178
|
+
Copyright (c) 2014, John MacFarlane
|
|
179
|
+
|
|
180
|
+
All rights reserved.
|
|
181
|
+
|
|
182
|
+
Redistribution and use in source and binary forms, with or without
|
|
183
|
+
modification, are permitted provided that the following conditions are met:
|
|
184
|
+
|
|
185
|
+
* Redistributions of source code must retain the above copyright
|
|
186
|
+
notice, this list of conditions and the following disclaimer.
|
|
187
|
+
|
|
188
|
+
* Redistributions in binary form must reproduce the above
|
|
189
|
+
copyright notice, this list of conditions and the following
|
|
190
|
+
disclaimer in the documentation and/or other materials provided
|
|
191
|
+
with the distribution.
|
|
192
|
+
|
|
193
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
194
|
+
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
195
|
+
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
|
196
|
+
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
|
197
|
+
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
198
|
+
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
|
199
|
+
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
200
|
+
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
|
201
|
+
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
202
|
+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
203
|
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|