gitlab-glfm-markdown 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: a63935824edb8a6e1bc9f276e0594950b239be027cf75a7e94a6430452eea1c4
4
+ data.tar.gz: a1f61b2aaa986c420fd59e58030e4b10428335df4477097520c018a0f46a3ae8
5
+ SHA512:
6
+ metadata.gz: a73add0ea499e37e225a97c8afa72aa79a281df98b4c8acc82541594552ea93e8bb7808b3009931c3c3412175c4db978c7db012391ea0669531a6bf9f8610ad5
7
+ data.tar.gz: e40e2310bda515d61043d2f3bcbd67ef4b5c2ac3a7e74eb6a6c64ccc6fda6cd53454e338bc556b5023e62162101bfcb4512fc0a927e08378bdd0d0aa559fa267
data/Cargo.lock ADDED
@@ -0,0 +1,1040 @@
1
+ # This file is automatically @generated by Cargo.
2
+ # It is not intended for manual editing.
3
+ version = 3
4
+
5
+ [[package]]
6
+ name = "adler"
7
+ version = "1.0.2"
8
+ source = "registry+https://github.com/rust-lang/crates.io-index"
9
+ checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe"
10
+
11
+ [[package]]
12
+ name = "aho-corasick"
13
+ version = "1.0.2"
14
+ source = "registry+https://github.com/rust-lang/crates.io-index"
15
+ checksum = "43f6cb1bf222025340178f382c426f13757b2960e89779dfcb319c32542a5a41"
16
+ dependencies = [
17
+ "memchr",
18
+ ]
19
+
20
+ [[package]]
21
+ name = "anstream"
22
+ version = "0.3.2"
23
+ source = "registry+https://github.com/rust-lang/crates.io-index"
24
+ checksum = "0ca84f3628370c59db74ee214b3263d58f9aadd9b4fe7e711fd87dc452b7f163"
25
+ dependencies = [
26
+ "anstyle",
27
+ "anstyle-parse",
28
+ "anstyle-query",
29
+ "anstyle-wincon",
30
+ "colorchoice",
31
+ "is-terminal",
32
+ "utf8parse",
33
+ ]
34
+
35
+ [[package]]
36
+ name = "anstyle"
37
+ version = "1.0.1"
38
+ source = "registry+https://github.com/rust-lang/crates.io-index"
39
+ checksum = "3a30da5c5f2d5e72842e00bcb57657162cdabef0931f40e2deb9b4140440cecd"
40
+
41
+ [[package]]
42
+ name = "anstyle-parse"
43
+ version = "0.2.1"
44
+ source = "registry+https://github.com/rust-lang/crates.io-index"
45
+ checksum = "938874ff5980b03a87c5524b3ae5b59cf99b1d6bc836848df7bc5ada9643c333"
46
+ dependencies = [
47
+ "utf8parse",
48
+ ]
49
+
50
+ [[package]]
51
+ name = "anstyle-query"
52
+ version = "1.0.0"
53
+ source = "registry+https://github.com/rust-lang/crates.io-index"
54
+ checksum = "5ca11d4be1bab0c8bc8734a9aa7bf4ee8316d462a08c6ac5052f888fef5b494b"
55
+ dependencies = [
56
+ "windows-sys",
57
+ ]
58
+
59
+ [[package]]
60
+ name = "anstyle-wincon"
61
+ version = "1.0.1"
62
+ source = "registry+https://github.com/rust-lang/crates.io-index"
63
+ checksum = "180abfa45703aebe0093f79badacc01b8fd4ea2e35118747e5811127f926e188"
64
+ dependencies = [
65
+ "anstyle",
66
+ "windows-sys",
67
+ ]
68
+
69
+ [[package]]
70
+ name = "argparse"
71
+ version = "0.2.2"
72
+ source = "registry+https://github.com/rust-lang/crates.io-index"
73
+ checksum = "3f8ebf5827e4ac4fd5946560e6a99776ea73b596d80898f357007317a7141e47"
74
+
75
+ [[package]]
76
+ name = "autocfg"
77
+ version = "1.1.0"
78
+ source = "registry+https://github.com/rust-lang/crates.io-index"
79
+ checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa"
80
+
81
+ [[package]]
82
+ name = "base64"
83
+ version = "0.21.2"
84
+ source = "registry+https://github.com/rust-lang/crates.io-index"
85
+ checksum = "604178f6c5c21f02dc555784810edfb88d34ac2c73b2eae109655649ee73ce3d"
86
+
87
+ [[package]]
88
+ name = "bincode"
89
+ version = "1.3.3"
90
+ source = "registry+https://github.com/rust-lang/crates.io-index"
91
+ checksum = "b1f45e9417d87227c7a56d22e471c6206462cba514c7590c09aff4cf6d1ddcad"
92
+ dependencies = [
93
+ "serde",
94
+ ]
95
+
96
+ [[package]]
97
+ name = "bindgen"
98
+ version = "0.62.0"
99
+ source = "registry+https://github.com/rust-lang/crates.io-index"
100
+ checksum = "c6720a8b7b2d39dd533285ed438d458f65b31b5c257e6ac7bb3d7e82844dd722"
101
+ dependencies = [
102
+ "bitflags",
103
+ "cexpr",
104
+ "clang-sys",
105
+ "lazy_static",
106
+ "lazycell",
107
+ "peeking_take_while",
108
+ "proc-macro2",
109
+ "quote",
110
+ "regex",
111
+ "rustc-hash",
112
+ "shlex",
113
+ "syn 1.0.109",
114
+ ]
115
+
116
+ [[package]]
117
+ name = "bit-set"
118
+ version = "0.5.3"
119
+ source = "registry+https://github.com/rust-lang/crates.io-index"
120
+ checksum = "0700ddab506f33b20a03b13996eccd309a48e5ff77d0d95926aa0210fb4e95f1"
121
+ dependencies = [
122
+ "bit-vec",
123
+ ]
124
+
125
+ [[package]]
126
+ name = "bit-vec"
127
+ version = "0.6.3"
128
+ source = "registry+https://github.com/rust-lang/crates.io-index"
129
+ checksum = "349f9b6a179ed607305526ca489b34ad0a41aed5f7980fa90eb03160b69598fb"
130
+
131
+ [[package]]
132
+ name = "bitflags"
133
+ version = "1.3.2"
134
+ source = "registry+https://github.com/rust-lang/crates.io-index"
135
+ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a"
136
+
137
+ [[package]]
138
+ name = "cc"
139
+ version = "1.0.79"
140
+ source = "registry+https://github.com/rust-lang/crates.io-index"
141
+ checksum = "50d30906286121d95be3d479533b458f87493b30a4b5f79a607db8f5d11aa91f"
142
+
143
+ [[package]]
144
+ name = "cexpr"
145
+ version = "0.6.0"
146
+ source = "registry+https://github.com/rust-lang/crates.io-index"
147
+ checksum = "6fac387a98bb7c37292057cffc56d62ecb629900026402633ae9160df93a8766"
148
+ dependencies = [
149
+ "nom",
150
+ ]
151
+
152
+ [[package]]
153
+ name = "cfg-if"
154
+ version = "1.0.0"
155
+ source = "registry+https://github.com/rust-lang/crates.io-index"
156
+ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
157
+
158
+ [[package]]
159
+ name = "clang-sys"
160
+ version = "1.6.1"
161
+ source = "registry+https://github.com/rust-lang/crates.io-index"
162
+ checksum = "c688fc74432808e3eb684cae8830a86be1d66a2bd58e1f248ed0960a590baf6f"
163
+ dependencies = [
164
+ "glob",
165
+ "libc",
166
+ "libloading",
167
+ ]
168
+
169
+ [[package]]
170
+ name = "clap"
171
+ version = "4.3.5"
172
+ source = "registry+https://github.com/rust-lang/crates.io-index"
173
+ checksum = "2686c4115cb0810d9a984776e197823d08ec94f176549a89a9efded477c456dc"
174
+ dependencies = [
175
+ "clap_builder",
176
+ "clap_derive",
177
+ "once_cell",
178
+ ]
179
+
180
+ [[package]]
181
+ name = "clap_builder"
182
+ version = "4.3.5"
183
+ source = "registry+https://github.com/rust-lang/crates.io-index"
184
+ checksum = "2e53afce1efce6ed1f633cf0e57612fe51db54a1ee4fd8f8503d078fe02d69ae"
185
+ dependencies = [
186
+ "anstream",
187
+ "anstyle",
188
+ "bitflags",
189
+ "clap_lex",
190
+ "strsim",
191
+ "terminal_size",
192
+ ]
193
+
194
+ [[package]]
195
+ name = "clap_derive"
196
+ version = "4.3.2"
197
+ source = "registry+https://github.com/rust-lang/crates.io-index"
198
+ checksum = "b8cd2b2a819ad6eec39e8f1d6b53001af1e5469f8c177579cdaeb313115b825f"
199
+ dependencies = [
200
+ "heck",
201
+ "proc-macro2",
202
+ "quote",
203
+ "syn 2.0.18",
204
+ ]
205
+
206
+ [[package]]
207
+ name = "clap_lex"
208
+ version = "0.5.0"
209
+ source = "registry+https://github.com/rust-lang/crates.io-index"
210
+ checksum = "2da6da31387c7e4ef160ffab6d5e7f00c42626fe39aea70a7b0f1773f7dd6c1b"
211
+
212
+ [[package]]
213
+ name = "colorchoice"
214
+ version = "1.0.0"
215
+ source = "registry+https://github.com/rust-lang/crates.io-index"
216
+ checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7"
217
+
218
+ [[package]]
219
+ name = "comrak"
220
+ version = "0.18.0"
221
+ source = "git+https://github.com/kivikakk/comrak.git#91e5240e4a2d878ab699d84bf123075ced74bf23"
222
+ dependencies = [
223
+ "clap",
224
+ "derive_builder",
225
+ "entities",
226
+ "memchr",
227
+ "once_cell",
228
+ "regex",
229
+ "shell-words",
230
+ "slug",
231
+ "syntect",
232
+ "typed-arena",
233
+ "unicode_categories",
234
+ "xdg",
235
+ ]
236
+
237
+ [[package]]
238
+ name = "crc32fast"
239
+ version = "1.3.2"
240
+ source = "registry+https://github.com/rust-lang/crates.io-index"
241
+ checksum = "b540bd8bc810d3885c6ea91e2018302f68baba2129ab3e88f32389ee9370880d"
242
+ dependencies = [
243
+ "cfg-if",
244
+ ]
245
+
246
+ [[package]]
247
+ name = "darling"
248
+ version = "0.14.4"
249
+ source = "registry+https://github.com/rust-lang/crates.io-index"
250
+ checksum = "7b750cb3417fd1b327431a470f388520309479ab0bf5e323505daf0290cd3850"
251
+ dependencies = [
252
+ "darling_core",
253
+ "darling_macro",
254
+ ]
255
+
256
+ [[package]]
257
+ name = "darling_core"
258
+ version = "0.14.4"
259
+ source = "registry+https://github.com/rust-lang/crates.io-index"
260
+ checksum = "109c1ca6e6b7f82cc233a97004ea8ed7ca123a9af07a8230878fcfda9b158bf0"
261
+ dependencies = [
262
+ "fnv",
263
+ "ident_case",
264
+ "proc-macro2",
265
+ "quote",
266
+ "strsim",
267
+ "syn 1.0.109",
268
+ ]
269
+
270
+ [[package]]
271
+ name = "darling_macro"
272
+ version = "0.14.4"
273
+ source = "registry+https://github.com/rust-lang/crates.io-index"
274
+ checksum = "a4aab4dbc9f7611d8b55048a3a16d2d010c2c8334e46304b40ac1cc14bf3b48e"
275
+ dependencies = [
276
+ "darling_core",
277
+ "quote",
278
+ "syn 1.0.109",
279
+ ]
280
+
281
+ [[package]]
282
+ name = "derive_builder"
283
+ version = "0.12.0"
284
+ source = "registry+https://github.com/rust-lang/crates.io-index"
285
+ checksum = "8d67778784b508018359cbc8696edb3db78160bab2c2a28ba7f56ef6932997f8"
286
+ dependencies = [
287
+ "derive_builder_macro",
288
+ ]
289
+
290
+ [[package]]
291
+ name = "derive_builder_core"
292
+ version = "0.12.0"
293
+ source = "registry+https://github.com/rust-lang/crates.io-index"
294
+ checksum = "c11bdc11a0c47bc7d37d582b5285da6849c96681023680b906673c5707af7b0f"
295
+ dependencies = [
296
+ "darling",
297
+ "proc-macro2",
298
+ "quote",
299
+ "syn 1.0.109",
300
+ ]
301
+
302
+ [[package]]
303
+ name = "derive_builder_macro"
304
+ version = "0.12.0"
305
+ source = "registry+https://github.com/rust-lang/crates.io-index"
306
+ checksum = "ebcda35c7a396850a55ffeac740804b40ffec779b98fffbb1738f4033f0ee79e"
307
+ dependencies = [
308
+ "derive_builder_core",
309
+ "syn 1.0.109",
310
+ ]
311
+
312
+ [[package]]
313
+ name = "deunicode"
314
+ version = "0.4.3"
315
+ source = "registry+https://github.com/rust-lang/crates.io-index"
316
+ checksum = "850878694b7933ca4c9569d30a34b55031b9b139ee1fc7b94a527c4ef960d690"
317
+
318
+ [[package]]
319
+ name = "entities"
320
+ version = "1.0.1"
321
+ source = "registry+https://github.com/rust-lang/crates.io-index"
322
+ checksum = "b5320ae4c3782150d900b79807611a59a99fc9a1d61d686faafc24b93fc8d7ca"
323
+
324
+ [[package]]
325
+ name = "errno"
326
+ version = "0.3.1"
327
+ source = "registry+https://github.com/rust-lang/crates.io-index"
328
+ checksum = "4bcfec3a70f97c962c307b2d2c56e358cf1d00b558d74262b5f929ee8cc7e73a"
329
+ dependencies = [
330
+ "errno-dragonfly",
331
+ "libc",
332
+ "windows-sys",
333
+ ]
334
+
335
+ [[package]]
336
+ name = "errno-dragonfly"
337
+ version = "0.1.2"
338
+ source = "registry+https://github.com/rust-lang/crates.io-index"
339
+ checksum = "aa68f1b12764fab894d2755d2518754e71b4fd80ecfb822714a1206c2aab39bf"
340
+ dependencies = [
341
+ "cc",
342
+ "libc",
343
+ ]
344
+
345
+ [[package]]
346
+ name = "fancy-regex"
347
+ version = "0.7.1"
348
+ source = "registry+https://github.com/rust-lang/crates.io-index"
349
+ checksum = "9d6b8560a05112eb52f04b00e5d3790c0dd75d9d980eb8a122fb23b92a623ccf"
350
+ dependencies = [
351
+ "bit-set",
352
+ "regex",
353
+ ]
354
+
355
+ [[package]]
356
+ name = "flate2"
357
+ version = "1.0.26"
358
+ source = "registry+https://github.com/rust-lang/crates.io-index"
359
+ checksum = "3b9429470923de8e8cbd4d2dc513535400b4b3fef0319fb5c4e1f520a7bef743"
360
+ dependencies = [
361
+ "crc32fast",
362
+ "miniz_oxide",
363
+ ]
364
+
365
+ [[package]]
366
+ name = "fnv"
367
+ version = "1.0.7"
368
+ source = "registry+https://github.com/rust-lang/crates.io-index"
369
+ checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1"
370
+
371
+ [[package]]
372
+ name = "glfm_markdown"
373
+ version = "0.0.3"
374
+ dependencies = [
375
+ "argparse",
376
+ "comrak",
377
+ "magnus",
378
+ ]
379
+
380
+ [[package]]
381
+ name = "glob"
382
+ version = "0.3.1"
383
+ source = "registry+https://github.com/rust-lang/crates.io-index"
384
+ checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b"
385
+
386
+ [[package]]
387
+ name = "hashbrown"
388
+ version = "0.12.3"
389
+ source = "registry+https://github.com/rust-lang/crates.io-index"
390
+ checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888"
391
+
392
+ [[package]]
393
+ name = "heck"
394
+ version = "0.4.1"
395
+ source = "registry+https://github.com/rust-lang/crates.io-index"
396
+ checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8"
397
+
398
+ [[package]]
399
+ name = "hermit-abi"
400
+ version = "0.3.1"
401
+ source = "registry+https://github.com/rust-lang/crates.io-index"
402
+ checksum = "fed44880c466736ef9a5c5b5facefb5ed0785676d0c02d612db14e54f0d84286"
403
+
404
+ [[package]]
405
+ name = "home"
406
+ version = "0.5.5"
407
+ source = "registry+https://github.com/rust-lang/crates.io-index"
408
+ checksum = "5444c27eef6923071f7ebcc33e3444508466a76f7a2b93da00ed6e19f30c1ddb"
409
+ dependencies = [
410
+ "windows-sys",
411
+ ]
412
+
413
+ [[package]]
414
+ name = "ident_case"
415
+ version = "1.0.1"
416
+ source = "registry+https://github.com/rust-lang/crates.io-index"
417
+ checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39"
418
+
419
+ [[package]]
420
+ name = "indexmap"
421
+ version = "1.9.3"
422
+ source = "registry+https://github.com/rust-lang/crates.io-index"
423
+ checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99"
424
+ dependencies = [
425
+ "autocfg",
426
+ "hashbrown",
427
+ ]
428
+
429
+ [[package]]
430
+ name = "io-lifetimes"
431
+ version = "1.0.11"
432
+ source = "registry+https://github.com/rust-lang/crates.io-index"
433
+ checksum = "eae7b9aee968036d54dce06cebaefd919e4472e753296daccd6d344e3e2df0c2"
434
+ dependencies = [
435
+ "hermit-abi",
436
+ "libc",
437
+ "windows-sys",
438
+ ]
439
+
440
+ [[package]]
441
+ name = "is-terminal"
442
+ version = "0.4.7"
443
+ source = "registry+https://github.com/rust-lang/crates.io-index"
444
+ checksum = "adcf93614601c8129ddf72e2d5633df827ba6551541c6d8c59520a371475be1f"
445
+ dependencies = [
446
+ "hermit-abi",
447
+ "io-lifetimes",
448
+ "rustix",
449
+ "windows-sys",
450
+ ]
451
+
452
+ [[package]]
453
+ name = "itoa"
454
+ version = "1.0.6"
455
+ source = "registry+https://github.com/rust-lang/crates.io-index"
456
+ checksum = "453ad9f582a441959e5f0d088b02ce04cfe8d51a8eaf077f12ac6d3e94164ca6"
457
+
458
+ [[package]]
459
+ name = "lazy_static"
460
+ version = "1.4.0"
461
+ source = "registry+https://github.com/rust-lang/crates.io-index"
462
+ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646"
463
+
464
+ [[package]]
465
+ name = "lazycell"
466
+ version = "1.3.0"
467
+ source = "registry+https://github.com/rust-lang/crates.io-index"
468
+ checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55"
469
+
470
+ [[package]]
471
+ name = "libc"
472
+ version = "0.2.146"
473
+ source = "registry+https://github.com/rust-lang/crates.io-index"
474
+ checksum = "f92be4933c13fd498862a9e02a3055f8a8d9c039ce33db97306fd5a6caa7f29b"
475
+
476
+ [[package]]
477
+ name = "libloading"
478
+ version = "0.7.4"
479
+ source = "registry+https://github.com/rust-lang/crates.io-index"
480
+ checksum = "b67380fd3b2fbe7527a606e18729d21c6f3951633d0500574c4dc22d2d638b9f"
481
+ dependencies = [
482
+ "cfg-if",
483
+ "winapi",
484
+ ]
485
+
486
+ [[package]]
487
+ name = "line-wrap"
488
+ version = "0.1.1"
489
+ source = "registry+https://github.com/rust-lang/crates.io-index"
490
+ checksum = "f30344350a2a51da54c1d53be93fade8a237e545dbcc4bdbe635413f2117cab9"
491
+ dependencies = [
492
+ "safemem",
493
+ ]
494
+
495
+ [[package]]
496
+ name = "linked-hash-map"
497
+ version = "0.5.6"
498
+ source = "registry+https://github.com/rust-lang/crates.io-index"
499
+ checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f"
500
+
501
+ [[package]]
502
+ name = "linux-raw-sys"
503
+ version = "0.3.8"
504
+ source = "registry+https://github.com/rust-lang/crates.io-index"
505
+ checksum = "ef53942eb7bf7ff43a617b3e2c1c4a5ecf5944a7c1bc12d7ee39bbb15e5c1519"
506
+
507
+ [[package]]
508
+ name = "magnus"
509
+ version = "0.4.4"
510
+ source = "registry+https://github.com/rust-lang/crates.io-index"
511
+ checksum = "fc87660cd7daa49fddbfd524c836de54d5c927d520cd163f43700c5087c57d6c"
512
+ dependencies = [
513
+ "magnus-macros",
514
+ "rb-sys",
515
+ "rb-sys-env",
516
+ ]
517
+
518
+ [[package]]
519
+ name = "magnus-macros"
520
+ version = "0.3.0"
521
+ source = "registry+https://github.com/rust-lang/crates.io-index"
522
+ checksum = "206cb23bfeea05180c97522ef6a3e52a4eb17b0ed2f30ee3ca9c4f994d2378ae"
523
+ dependencies = [
524
+ "proc-macro2",
525
+ "quote",
526
+ "syn 1.0.109",
527
+ ]
528
+
529
+ [[package]]
530
+ name = "memchr"
531
+ version = "2.5.0"
532
+ source = "registry+https://github.com/rust-lang/crates.io-index"
533
+ checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d"
534
+
535
+ [[package]]
536
+ name = "minimal-lexical"
537
+ version = "0.2.1"
538
+ source = "registry+https://github.com/rust-lang/crates.io-index"
539
+ checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a"
540
+
541
+ [[package]]
542
+ name = "miniz_oxide"
543
+ version = "0.7.1"
544
+ source = "registry+https://github.com/rust-lang/crates.io-index"
545
+ checksum = "e7810e0be55b428ada41041c41f32c9f1a42817901b4ccf45fa3d4b6561e74c7"
546
+ dependencies = [
547
+ "adler",
548
+ ]
549
+
550
+ [[package]]
551
+ name = "nom"
552
+ version = "7.1.3"
553
+ source = "registry+https://github.com/rust-lang/crates.io-index"
554
+ checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a"
555
+ dependencies = [
556
+ "memchr",
557
+ "minimal-lexical",
558
+ ]
559
+
560
+ [[package]]
561
+ name = "once_cell"
562
+ version = "1.18.0"
563
+ source = "registry+https://github.com/rust-lang/crates.io-index"
564
+ checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d"
565
+
566
+ [[package]]
567
+ name = "onig"
568
+ version = "6.4.0"
569
+ source = "registry+https://github.com/rust-lang/crates.io-index"
570
+ checksum = "8c4b31c8722ad9171c6d77d3557db078cab2bd50afcc9d09c8b315c59df8ca4f"
571
+ dependencies = [
572
+ "bitflags",
573
+ "libc",
574
+ "once_cell",
575
+ "onig_sys",
576
+ ]
577
+
578
+ [[package]]
579
+ name = "onig_sys"
580
+ version = "69.8.1"
581
+ source = "registry+https://github.com/rust-lang/crates.io-index"
582
+ checksum = "7b829e3d7e9cc74c7e315ee8edb185bf4190da5acde74afd7fc59c35b1f086e7"
583
+ dependencies = [
584
+ "cc",
585
+ "pkg-config",
586
+ ]
587
+
588
+ [[package]]
589
+ name = "peeking_take_while"
590
+ version = "0.1.2"
591
+ source = "registry+https://github.com/rust-lang/crates.io-index"
592
+ checksum = "19b17cddbe7ec3f8bc800887bab5e717348c95ea2ca0b1bf0837fb964dc67099"
593
+
594
+ [[package]]
595
+ name = "pkg-config"
596
+ version = "0.3.27"
597
+ source = "registry+https://github.com/rust-lang/crates.io-index"
598
+ checksum = "26072860ba924cbfa98ea39c8c19b4dd6a4a25423dbdf219c1eca91aa0cf6964"
599
+
600
+ [[package]]
601
+ name = "plist"
602
+ version = "1.4.3"
603
+ source = "registry+https://github.com/rust-lang/crates.io-index"
604
+ checksum = "9bd9647b268a3d3e14ff09c23201133a62589c658db02bb7388c7246aafe0590"
605
+ dependencies = [
606
+ "base64",
607
+ "indexmap",
608
+ "line-wrap",
609
+ "quick-xml",
610
+ "serde",
611
+ "time",
612
+ ]
613
+
614
+ [[package]]
615
+ name = "proc-macro2"
616
+ version = "1.0.60"
617
+ source = "registry+https://github.com/rust-lang/crates.io-index"
618
+ checksum = "dec2b086b7a862cf4de201096214fa870344cf922b2b30c167badb3af3195406"
619
+ dependencies = [
620
+ "unicode-ident",
621
+ ]
622
+
623
+ [[package]]
624
+ name = "quick-xml"
625
+ version = "0.28.2"
626
+ source = "registry+https://github.com/rust-lang/crates.io-index"
627
+ checksum = "0ce5e73202a820a31f8a0ee32ada5e21029c81fd9e3ebf668a40832e4219d9d1"
628
+ dependencies = [
629
+ "memchr",
630
+ ]
631
+
632
+ [[package]]
633
+ name = "quote"
634
+ version = "1.0.28"
635
+ source = "registry+https://github.com/rust-lang/crates.io-index"
636
+ checksum = "1b9ab9c7eadfd8df19006f1cf1a4aed13540ed5cbc047010ece5826e10825488"
637
+ dependencies = [
638
+ "proc-macro2",
639
+ ]
640
+
641
+ [[package]]
642
+ name = "rb-sys"
643
+ version = "0.9.79"
644
+ source = "registry+https://github.com/rust-lang/crates.io-index"
645
+ checksum = "939fb78db3e4f26665c1d4c7b91ca66d3578335a19aba552d4a6445811d07072"
646
+ dependencies = [
647
+ "rb-sys-build",
648
+ ]
649
+
650
+ [[package]]
651
+ name = "rb-sys-build"
652
+ version = "0.9.79"
653
+ source = "registry+https://github.com/rust-lang/crates.io-index"
654
+ checksum = "335a95eb0420d52fa94ef12019df3c2c250c6b19cbb3c60bd05cb7e9c362072c"
655
+ dependencies = [
656
+ "bindgen",
657
+ "lazy_static",
658
+ "proc-macro2",
659
+ "quote",
660
+ "regex",
661
+ "shell-words",
662
+ "syn 1.0.109",
663
+ ]
664
+
665
+ [[package]]
666
+ name = "rb-sys-env"
667
+ version = "0.1.2"
668
+ source = "registry+https://github.com/rust-lang/crates.io-index"
669
+ checksum = "a35802679f07360454b418a5d1735c89716bde01d35b1560fc953c1415a0b3bb"
670
+
671
+ [[package]]
672
+ name = "regex"
673
+ version = "1.8.4"
674
+ source = "registry+https://github.com/rust-lang/crates.io-index"
675
+ checksum = "d0ab3ca65655bb1e41f2a8c8cd662eb4fb035e67c3f78da1d61dffe89d07300f"
676
+ dependencies = [
677
+ "aho-corasick",
678
+ "memchr",
679
+ "regex-syntax 0.7.2",
680
+ ]
681
+
682
+ [[package]]
683
+ name = "regex-syntax"
684
+ version = "0.6.29"
685
+ source = "registry+https://github.com/rust-lang/crates.io-index"
686
+ checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1"
687
+
688
+ [[package]]
689
+ name = "regex-syntax"
690
+ version = "0.7.2"
691
+ source = "registry+https://github.com/rust-lang/crates.io-index"
692
+ checksum = "436b050e76ed2903236f032a59761c1eb99e1b0aead2c257922771dab1fc8c78"
693
+
694
+ [[package]]
695
+ name = "rustc-hash"
696
+ version = "1.1.0"
697
+ source = "registry+https://github.com/rust-lang/crates.io-index"
698
+ checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2"
699
+
700
+ [[package]]
701
+ name = "rustix"
702
+ version = "0.37.20"
703
+ source = "registry+https://github.com/rust-lang/crates.io-index"
704
+ checksum = "b96e891d04aa506a6d1f318d2771bcb1c7dfda84e126660ace067c9b474bb2c0"
705
+ dependencies = [
706
+ "bitflags",
707
+ "errno",
708
+ "io-lifetimes",
709
+ "libc",
710
+ "linux-raw-sys",
711
+ "windows-sys",
712
+ ]
713
+
714
+ [[package]]
715
+ name = "ryu"
716
+ version = "1.0.13"
717
+ source = "registry+https://github.com/rust-lang/crates.io-index"
718
+ checksum = "f91339c0467de62360649f8d3e185ca8de4224ff281f66000de5eb2a77a79041"
719
+
720
+ [[package]]
721
+ name = "safemem"
722
+ version = "0.3.3"
723
+ source = "registry+https://github.com/rust-lang/crates.io-index"
724
+ checksum = "ef703b7cb59335eae2eb93ceb664c0eb7ea6bf567079d843e09420219668e072"
725
+
726
+ [[package]]
727
+ name = "same-file"
728
+ version = "1.0.6"
729
+ source = "registry+https://github.com/rust-lang/crates.io-index"
730
+ checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502"
731
+ dependencies = [
732
+ "winapi-util",
733
+ ]
734
+
735
+ [[package]]
736
+ name = "serde"
737
+ version = "1.0.164"
738
+ source = "registry+https://github.com/rust-lang/crates.io-index"
739
+ checksum = "9e8c8cf938e98f769bc164923b06dce91cea1751522f46f8466461af04c9027d"
740
+
741
+ [[package]]
742
+ name = "serde_derive"
743
+ version = "1.0.164"
744
+ source = "registry+https://github.com/rust-lang/crates.io-index"
745
+ checksum = "d9735b638ccc51c28bf6914d90a2e9725b377144fc612c49a611fddd1b631d68"
746
+ dependencies = [
747
+ "proc-macro2",
748
+ "quote",
749
+ "syn 2.0.18",
750
+ ]
751
+
752
+ [[package]]
753
+ name = "serde_json"
754
+ version = "1.0.97"
755
+ source = "registry+https://github.com/rust-lang/crates.io-index"
756
+ checksum = "bdf3bf93142acad5821c99197022e170842cdbc1c30482b98750c688c640842a"
757
+ dependencies = [
758
+ "itoa",
759
+ "ryu",
760
+ "serde",
761
+ ]
762
+
763
+ [[package]]
764
+ name = "shell-words"
765
+ version = "1.1.0"
766
+ source = "registry+https://github.com/rust-lang/crates.io-index"
767
+ checksum = "24188a676b6ae68c3b2cb3a01be17fbf7240ce009799bb56d5b1409051e78fde"
768
+
769
+ [[package]]
770
+ name = "shlex"
771
+ version = "1.1.0"
772
+ source = "registry+https://github.com/rust-lang/crates.io-index"
773
+ checksum = "43b2853a4d09f215c24cc5489c992ce46052d359b5109343cbafbf26bc62f8a3"
774
+
775
+ [[package]]
776
+ name = "slug"
777
+ version = "0.1.4"
778
+ source = "registry+https://github.com/rust-lang/crates.io-index"
779
+ checksum = "b3bc762e6a4b6c6fcaade73e77f9ebc6991b676f88bb2358bddb56560f073373"
780
+ dependencies = [
781
+ "deunicode",
782
+ ]
783
+
784
+ [[package]]
785
+ name = "strsim"
786
+ version = "0.10.0"
787
+ source = "registry+https://github.com/rust-lang/crates.io-index"
788
+ checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623"
789
+
790
+ [[package]]
791
+ name = "syn"
792
+ version = "1.0.109"
793
+ source = "registry+https://github.com/rust-lang/crates.io-index"
794
+ checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237"
795
+ dependencies = [
796
+ "proc-macro2",
797
+ "quote",
798
+ "unicode-ident",
799
+ ]
800
+
801
+ [[package]]
802
+ name = "syn"
803
+ version = "2.0.18"
804
+ source = "registry+https://github.com/rust-lang/crates.io-index"
805
+ checksum = "32d41677bcbe24c20c52e7c70b0d8db04134c5d1066bf98662e2871ad200ea3e"
806
+ dependencies = [
807
+ "proc-macro2",
808
+ "quote",
809
+ "unicode-ident",
810
+ ]
811
+
812
+ [[package]]
813
+ name = "syntect"
814
+ version = "5.0.0"
815
+ source = "registry+https://github.com/rust-lang/crates.io-index"
816
+ checksum = "c6c454c27d9d7d9a84c7803aaa3c50cd088d2906fe3c6e42da3209aa623576a8"
817
+ dependencies = [
818
+ "bincode",
819
+ "bitflags",
820
+ "fancy-regex",
821
+ "flate2",
822
+ "fnv",
823
+ "lazy_static",
824
+ "once_cell",
825
+ "onig",
826
+ "plist",
827
+ "regex-syntax 0.6.29",
828
+ "serde",
829
+ "serde_derive",
830
+ "serde_json",
831
+ "thiserror",
832
+ "walkdir",
833
+ "yaml-rust",
834
+ ]
835
+
836
+ [[package]]
837
+ name = "terminal_size"
838
+ version = "0.2.6"
839
+ source = "registry+https://github.com/rust-lang/crates.io-index"
840
+ checksum = "8e6bf6f19e9f8ed8d4048dc22981458ebcf406d67e94cd422e5ecd73d63b3237"
841
+ dependencies = [
842
+ "rustix",
843
+ "windows-sys",
844
+ ]
845
+
846
+ [[package]]
847
+ name = "thiserror"
848
+ version = "1.0.40"
849
+ source = "registry+https://github.com/rust-lang/crates.io-index"
850
+ checksum = "978c9a314bd8dc99be594bc3c175faaa9794be04a5a5e153caba6915336cebac"
851
+ dependencies = [
852
+ "thiserror-impl",
853
+ ]
854
+
855
+ [[package]]
856
+ name = "thiserror-impl"
857
+ version = "1.0.40"
858
+ source = "registry+https://github.com/rust-lang/crates.io-index"
859
+ checksum = "f9456a42c5b0d803c8cd86e73dd7cc9edd429499f37a3550d286d5e86720569f"
860
+ dependencies = [
861
+ "proc-macro2",
862
+ "quote",
863
+ "syn 2.0.18",
864
+ ]
865
+
866
+ [[package]]
867
+ name = "time"
868
+ version = "0.3.22"
869
+ source = "registry+https://github.com/rust-lang/crates.io-index"
870
+ checksum = "ea9e1b3cf1243ae005d9e74085d4d542f3125458f3a81af210d901dcd7411efd"
871
+ dependencies = [
872
+ "itoa",
873
+ "serde",
874
+ "time-core",
875
+ "time-macros",
876
+ ]
877
+
878
+ [[package]]
879
+ name = "time-core"
880
+ version = "0.1.1"
881
+ source = "registry+https://github.com/rust-lang/crates.io-index"
882
+ checksum = "7300fbefb4dadc1af235a9cef3737cea692a9d97e1b9cbcd4ebdae6f8868e6fb"
883
+
884
+ [[package]]
885
+ name = "time-macros"
886
+ version = "0.2.9"
887
+ source = "registry+https://github.com/rust-lang/crates.io-index"
888
+ checksum = "372950940a5f07bf38dbe211d7283c9e6d7327df53794992d293e534c733d09b"
889
+ dependencies = [
890
+ "time-core",
891
+ ]
892
+
893
+ [[package]]
894
+ name = "typed-arena"
895
+ version = "2.0.2"
896
+ source = "registry+https://github.com/rust-lang/crates.io-index"
897
+ checksum = "6af6ae20167a9ece4bcb41af5b80f8a1f1df981f6391189ce00fd257af04126a"
898
+
899
+ [[package]]
900
+ name = "unicode-ident"
901
+ version = "1.0.9"
902
+ source = "registry+https://github.com/rust-lang/crates.io-index"
903
+ checksum = "b15811caf2415fb889178633e7724bad2509101cde276048e013b9def5e51fa0"
904
+
905
+ [[package]]
906
+ name = "unicode_categories"
907
+ version = "0.1.1"
908
+ source = "registry+https://github.com/rust-lang/crates.io-index"
909
+ checksum = "39ec24b3121d976906ece63c9daad25b85969647682eee313cb5779fdd69e14e"
910
+
911
+ [[package]]
912
+ name = "utf8parse"
913
+ version = "0.2.1"
914
+ source = "registry+https://github.com/rust-lang/crates.io-index"
915
+ checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a"
916
+
917
+ [[package]]
918
+ name = "walkdir"
919
+ version = "2.3.3"
920
+ source = "registry+https://github.com/rust-lang/crates.io-index"
921
+ checksum = "36df944cda56c7d8d8b7496af378e6b16de9284591917d307c9b4d313c44e698"
922
+ dependencies = [
923
+ "same-file",
924
+ "winapi-util",
925
+ ]
926
+
927
+ [[package]]
928
+ name = "winapi"
929
+ version = "0.3.9"
930
+ source = "registry+https://github.com/rust-lang/crates.io-index"
931
+ checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419"
932
+ dependencies = [
933
+ "winapi-i686-pc-windows-gnu",
934
+ "winapi-x86_64-pc-windows-gnu",
935
+ ]
936
+
937
+ [[package]]
938
+ name = "winapi-i686-pc-windows-gnu"
939
+ version = "0.4.0"
940
+ source = "registry+https://github.com/rust-lang/crates.io-index"
941
+ checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6"
942
+
943
+ [[package]]
944
+ name = "winapi-util"
945
+ version = "0.1.5"
946
+ source = "registry+https://github.com/rust-lang/crates.io-index"
947
+ checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178"
948
+ dependencies = [
949
+ "winapi",
950
+ ]
951
+
952
+ [[package]]
953
+ name = "winapi-x86_64-pc-windows-gnu"
954
+ version = "0.4.0"
955
+ source = "registry+https://github.com/rust-lang/crates.io-index"
956
+ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
957
+
958
+ [[package]]
959
+ name = "windows-sys"
960
+ version = "0.48.0"
961
+ source = "registry+https://github.com/rust-lang/crates.io-index"
962
+ checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9"
963
+ dependencies = [
964
+ "windows-targets",
965
+ ]
966
+
967
+ [[package]]
968
+ name = "windows-targets"
969
+ version = "0.48.0"
970
+ source = "registry+https://github.com/rust-lang/crates.io-index"
971
+ checksum = "7b1eb6f0cd7c80c79759c929114ef071b87354ce476d9d94271031c0497adfd5"
972
+ dependencies = [
973
+ "windows_aarch64_gnullvm",
974
+ "windows_aarch64_msvc",
975
+ "windows_i686_gnu",
976
+ "windows_i686_msvc",
977
+ "windows_x86_64_gnu",
978
+ "windows_x86_64_gnullvm",
979
+ "windows_x86_64_msvc",
980
+ ]
981
+
982
+ [[package]]
983
+ name = "windows_aarch64_gnullvm"
984
+ version = "0.48.0"
985
+ source = "registry+https://github.com/rust-lang/crates.io-index"
986
+ checksum = "91ae572e1b79dba883e0d315474df7305d12f569b400fcf90581b06062f7e1bc"
987
+
988
+ [[package]]
989
+ name = "windows_aarch64_msvc"
990
+ version = "0.48.0"
991
+ source = "registry+https://github.com/rust-lang/crates.io-index"
992
+ checksum = "b2ef27e0d7bdfcfc7b868b317c1d32c641a6fe4629c171b8928c7b08d98d7cf3"
993
+
994
+ [[package]]
995
+ name = "windows_i686_gnu"
996
+ version = "0.48.0"
997
+ source = "registry+https://github.com/rust-lang/crates.io-index"
998
+ checksum = "622a1962a7db830d6fd0a69683c80a18fda201879f0f447f065a3b7467daa241"
999
+
1000
+ [[package]]
1001
+ name = "windows_i686_msvc"
1002
+ version = "0.48.0"
1003
+ source = "registry+https://github.com/rust-lang/crates.io-index"
1004
+ checksum = "4542c6e364ce21bf45d69fdd2a8e455fa38d316158cfd43b3ac1c5b1b19f8e00"
1005
+
1006
+ [[package]]
1007
+ name = "windows_x86_64_gnu"
1008
+ version = "0.48.0"
1009
+ source = "registry+https://github.com/rust-lang/crates.io-index"
1010
+ checksum = "ca2b8a661f7628cbd23440e50b05d705db3686f894fc9580820623656af974b1"
1011
+
1012
+ [[package]]
1013
+ name = "windows_x86_64_gnullvm"
1014
+ version = "0.48.0"
1015
+ source = "registry+https://github.com/rust-lang/crates.io-index"
1016
+ checksum = "7896dbc1f41e08872e9d5e8f8baa8fdd2677f29468c4e156210174edc7f7b953"
1017
+
1018
+ [[package]]
1019
+ name = "windows_x86_64_msvc"
1020
+ version = "0.48.0"
1021
+ source = "registry+https://github.com/rust-lang/crates.io-index"
1022
+ checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a"
1023
+
1024
+ [[package]]
1025
+ name = "xdg"
1026
+ version = "2.5.0"
1027
+ source = "registry+https://github.com/rust-lang/crates.io-index"
1028
+ checksum = "688597db5a750e9cad4511cb94729a078e274308099a0382b5b8203bbc767fee"
1029
+ dependencies = [
1030
+ "home",
1031
+ ]
1032
+
1033
+ [[package]]
1034
+ name = "yaml-rust"
1035
+ version = "0.4.5"
1036
+ source = "registry+https://github.com/rust-lang/crates.io-index"
1037
+ checksum = "56c1936c4cc7a1c9ab21a1ebb602eb942ba868cbd44a99cb7cdc5892335e1c85"
1038
+ dependencies = [
1039
+ "linked-hash-map",
1040
+ ]
data/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2022-present GitLab B.V.
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,35 @@
1
+ # GitLab Flavored Markdown
2
+
3
+ Implements GLFM (as used by GitLab) using a Rust-based markdown parser.
4
+
5
+ This project is currently EXPLORATORY, so anything and everything will change.
6
+
7
+ ## Installation
8
+
9
+ Clone the repository and run `gem install`. There is currently no published rubygem for this project.
10
+
11
+ ## Usage
12
+
13
+ Try on command line:
14
+
15
+ ```
16
+ rake compile
17
+ bin/console
18
+
19
+ GLFMMarkdown.to_html('# header', options: {sourcepos: true})
20
+ ```
21
+
22
+ ## Development
23
+
24
+ A command line executable can be built for debugging.
25
+
26
+ ```
27
+ cd ext/glfm_markdown
28
+ cargo run --bin glfm_markdown -- --sourcepos
29
+ ```
30
+
31
+ There is a VSCode workspace that allows you to `Debug executable`
32
+
33
+ ## Contributing
34
+
35
+ Bug reports and merge requests are welcome on GitLab at https://gitlab.com/gitlab-org/ruby/gems/gitlab-glfm-markdown.
@@ -0,0 +1,17 @@
1
+ [package]
2
+ name = "glfm_markdown"
3
+ version = "0.0.3"
4
+ edition = "2021"
5
+ authors = ["digitalmoksha <bwalker@gitlab.com>"]
6
+ publish = false
7
+
8
+ [lib]
9
+ crate-type = ["cdylib"]
10
+
11
+ [[bin]]
12
+ name = "glfm_markdown"
13
+
14
+ [dependencies]
15
+ magnus = { version = "0.4" }
16
+ argparse = { version = ">= 0.2.1" }
17
+ comrak = { git = "https://github.com/kivikakk/comrak.git" }
@@ -0,0 +1,6 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'mkmf'
4
+ require 'rb_sys/mkmf'
5
+
6
+ create_rust_makefile('glfm_markdown/glfm_markdown')
@@ -0,0 +1,30 @@
1
+ #[derive(Debug)]
2
+ pub struct RenderOptions {
3
+ pub sourcepos: bool,
4
+ pub debug: bool,
5
+ }
6
+
7
+ pub fn render(text: String, options: RenderOptions) -> String {
8
+ render_comrak(text, options)
9
+ }
10
+
11
+ fn render_comrak(text: String, options: RenderOptions) -> String {
12
+ let mut comrak_options = comrak::ComrakOptions::default();
13
+
14
+ comrak_options.extension.strikethrough = true;
15
+ comrak_options.extension.table = true;
16
+ comrak_options.extension.autolink = true;
17
+ comrak_options.extension.tasklist = false;
18
+ comrak_options.extension.footnotes = true;
19
+
20
+ comrak_options.render.unsafe_ = true;
21
+ comrak_options.render.github_pre_lang = true;
22
+ comrak_options.render.full_info_string = true;
23
+ comrak_options.render.hardbreaks = false;
24
+ comrak_options.render.sourcepos = options.sourcepos;
25
+
26
+ comrak_options.parse.smart = false;
27
+ comrak_options.parse.relaxed_autolinks = false;
28
+
29
+ comrak::markdown_to_html(&text, &comrak_options)
30
+ }
@@ -0,0 +1,21 @@
1
+ use magnus::{define_module, function, prelude::*, Error, RHash, Symbol};
2
+
3
+ mod glfm;
4
+ use glfm::{render, RenderOptions};
5
+
6
+ pub fn render_to_html(text: String, options: RHash) -> String {
7
+ let sourcepos: bool = options.lookup::<_, bool>(Symbol::new("sourcepos")).unwrap();
8
+ let debug: bool = options.lookup::<_, bool>(Symbol::new("debug")).unwrap();
9
+ let render_options = RenderOptions { sourcepos, debug };
10
+
11
+ render(text, render_options)
12
+ }
13
+
14
+ #[magnus::init]
15
+ fn init() -> Result<(), Error> {
16
+ let module = define_module("GLFMMarkdown")?;
17
+
18
+ module.define_singleton_method("render_to_html", function!(render_to_html, 2))?;
19
+
20
+ Ok(())
21
+ }
@@ -0,0 +1,54 @@
1
+ mod glfm;
2
+ use glfm::{render, RenderOptions};
3
+ use std::io::Read;
4
+ use std::io::Write;
5
+
6
+ fn main() {
7
+ let mut input = "-".to_owned();
8
+ let mut output = "-".to_owned();
9
+ let mut sourcepos = false;
10
+ let mut debug = false;
11
+
12
+ {
13
+ // this block limits scope of borrows by cli.refer() method
14
+ let mut cli = argparse::ArgumentParser::new();
15
+
16
+ cli.set_description("Gitlab Flavored Markdown. Experimental.");
17
+
18
+ cli.refer(&mut input)
19
+ .add_argument("file", argparse::Store, "File to read");
20
+ cli.refer(&mut output)
21
+ .add_option(&["-o", "--output"], argparse::Store, "File to write");
22
+ cli.refer(&mut sourcepos).add_option(
23
+ &["--sourcepos"],
24
+ argparse::StoreTrue,
25
+ "Include source mappings in HTML attributes.",
26
+ );
27
+ cli.refer(&mut debug).add_option(
28
+ &["--debug"],
29
+ argparse::StoreTrue,
30
+ "Show debug information",
31
+ );
32
+
33
+ cli.parse_args_or_exit();
34
+ }
35
+
36
+ let vec = if input == "-" {
37
+ let mut vec = Vec::new();
38
+ std::io::stdin().read_to_end(&mut vec).unwrap();
39
+ vec
40
+ } else {
41
+ std::fs::read(input).unwrap()
42
+ };
43
+
44
+ let source = String::from_utf8_lossy(&vec);
45
+ let options = RenderOptions { sourcepos, debug };
46
+
47
+ let result = render(source.to_string(), options);
48
+
49
+ if output == "-" {
50
+ std::io::stdout().write_all(result.as_bytes()).unwrap();
51
+ } else {
52
+ std::fs::write(output, &result).unwrap();
53
+ }
54
+ }
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ module GLFMMarkdown
4
+ VERSION = '0.0.3'
5
+ end
@@ -0,0 +1,17 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative 'glfm_markdown/version'
4
+ require_relative 'glfm_markdown/glfm_markdown'
5
+
6
+ DEFAULT_OPTIONS = {
7
+ sourcepos: true,
8
+ debug: false
9
+ }.freeze
10
+
11
+ module GLFMMarkdown
12
+ class << self
13
+ def to_html(text, options: {})
14
+ render_to_html(text, DEFAULT_OPTIONS.merge(options))
15
+ end
16
+ end
17
+ end
metadata ADDED
@@ -0,0 +1,126 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: gitlab-glfm-markdown
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.3
5
+ platform: ruby
6
+ authors:
7
+ - Brett Walker
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2023-07-05 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: rb_sys
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '0.9'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '0.9'
27
+ - !ruby/object:Gem::Dependency
28
+ name: pry
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: 0.12.2
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: 0.12.2
41
+ - !ruby/object:Gem::Dependency
42
+ name: rake
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '13.0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '13.0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: rake-compiler
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: '1.2'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: '1.2'
69
+ - !ruby/object:Gem::Dependency
70
+ name: rake-compiler-dock
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - "~>"
74
+ - !ruby/object:Gem::Version
75
+ version: '1.3'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - "~>"
81
+ - !ruby/object:Gem::Version
82
+ version: '1.3'
83
+ description: GLFM Markdown
84
+ email:
85
+ - bwalker@gitlab.com
86
+ executables: []
87
+ extensions:
88
+ - ext/glfm_markdown/extconf.rb
89
+ extra_rdoc_files: []
90
+ files:
91
+ - Cargo.lock
92
+ - LICENSE
93
+ - README.md
94
+ - ext/glfm_markdown/Cargo.toml
95
+ - ext/glfm_markdown/extconf.rb
96
+ - ext/glfm_markdown/src/glfm.rs
97
+ - ext/glfm_markdown/src/lib.rs
98
+ - ext/glfm_markdown/src/main.rs
99
+ - lib/glfm_markdown.rb
100
+ - lib/glfm_markdown/version.rb
101
+ homepage: https://gitlab.com/gitlab-org/ruby/gems/gitlab-glfm-markdown
102
+ licenses: []
103
+ metadata:
104
+ homepage_uri: https://gitlab.com/gitlab-org/ruby/gems/gitlab-glfm-markdown
105
+ source_code_uri: https://gitlab.com/gitlab-org/ruby/gems/gitlab-glfm-markdown
106
+ changelog_uri: https://gitlab.com/gitlab-org/ruby/gems/gitlab-glfm-markdown/CHANGELOG.md
107
+ post_install_message:
108
+ rdoc_options: []
109
+ require_paths:
110
+ - lib
111
+ required_ruby_version: !ruby/object:Gem::Requirement
112
+ requirements:
113
+ - - ">="
114
+ - !ruby/object:Gem::Version
115
+ version: 3.0.0
116
+ required_rubygems_version: !ruby/object:Gem::Requirement
117
+ requirements:
118
+ - - ">="
119
+ - !ruby/object:Gem::Version
120
+ version: 3.2.33
121
+ requirements: []
122
+ rubygems_version: 3.4.10
123
+ signing_key:
124
+ specification_version: 4
125
+ summary: GLFM Markdown
126
+ test_files: []