gitlab-glfm-markdown 0.0.21 → 0.0.23
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Cargo.lock +54 -44
- data/README.md +1 -1
- data/ext/glfm_markdown/Cargo.toml +2 -2
- data/ext/glfm_markdown/src/glfm.rs +2 -0
- data/ext/glfm_markdown/src/lib.rs +1 -0
- data/ext/glfm_markdown/src/main.rs +5 -0
- data/lib/glfm_markdown/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cebf9be631e8cd45dee395b9a24ee442897aa54c98db009760e5ad2f53636325
|
4
|
+
data.tar.gz: 2dd05467f020c6d75aedab634eadaeeeda416910e03c7be2d51ce4d07c098d5b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2065fc4daf7fd3eb06c7fa5cc6fc4a56c590b0ad4d97299a67ad86854523edf5303bfb0e4406f43d10610d558d134dc289c4bf722f110c28e2ad329e3e1f1118
|
7
|
+
data.tar.gz: ba762e9f8399af6d2c7e4d44df9afce7054315d8dedf0002404f2dd286ad768e13f984446973f12e6f703e426403031869d4a03a1e1d58851fdabf4c19f35d2b
|
data/Cargo.lock
CHANGED
@@ -128,6 +128,31 @@ version = "2.5.0"
|
|
128
128
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
129
129
|
checksum = "cf4b9d6a944f767f8e5e0db018570623c85f3d925ac718db4e06d0187adb21c1"
|
130
130
|
|
131
|
+
[[package]]
|
132
|
+
name = "bon"
|
133
|
+
version = "3.1.0"
|
134
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
135
|
+
checksum = "790d33b1027fac712b9cd2079bfb7978fe90a6aac7c7b97abe32377e699fe08f"
|
136
|
+
dependencies = [
|
137
|
+
"bon-macros",
|
138
|
+
"rustversion",
|
139
|
+
]
|
140
|
+
|
141
|
+
[[package]]
|
142
|
+
name = "bon-macros"
|
143
|
+
version = "3.1.0"
|
144
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
145
|
+
checksum = "447acd38643a31ee16063f92ee56c56b2694a4ecae79eba7b67a356f37b19575"
|
146
|
+
dependencies = [
|
147
|
+
"darling",
|
148
|
+
"ident_case",
|
149
|
+
"prettyplease",
|
150
|
+
"proc-macro2",
|
151
|
+
"quote",
|
152
|
+
"rustversion",
|
153
|
+
"syn",
|
154
|
+
]
|
155
|
+
|
131
156
|
[[package]]
|
132
157
|
name = "bumpalo"
|
133
158
|
version = "3.16.0"
|
@@ -224,12 +249,12 @@ checksum = "0b6a852b24ab71dffc585bcb46eaf7959d175cb865a7152e35b348d1b2960422"
|
|
224
249
|
|
225
250
|
[[package]]
|
226
251
|
name = "comrak"
|
227
|
-
version = "0.
|
252
|
+
version = "0.31.0"
|
228
253
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
229
|
-
checksum = "
|
254
|
+
checksum = "453dcb42e33f7b474d7e0db12e0b8d82802c88f35cf5a1d8c297d0dfcecb154f"
|
230
255
|
dependencies = [
|
256
|
+
"bon",
|
231
257
|
"caseless",
|
232
|
-
"derive_builder",
|
233
258
|
"emojis",
|
234
259
|
"entities",
|
235
260
|
"memchr",
|
@@ -252,9 +277,9 @@ dependencies = [
|
|
252
277
|
|
253
278
|
[[package]]
|
254
279
|
name = "darling"
|
255
|
-
version = "0.20.
|
280
|
+
version = "0.20.10"
|
256
281
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
257
|
-
checksum = "
|
282
|
+
checksum = "6f63b86c8a8826a49b8c21f08a2d07338eec8d900540f8630dc76284be802989"
|
258
283
|
dependencies = [
|
259
284
|
"darling_core",
|
260
285
|
"darling_macro",
|
@@ -262,9 +287,9 @@ dependencies = [
|
|
262
287
|
|
263
288
|
[[package]]
|
264
289
|
name = "darling_core"
|
265
|
-
version = "0.20.
|
290
|
+
version = "0.20.10"
|
266
291
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
267
|
-
checksum = "
|
292
|
+
checksum = "95133861a8032aaea082871032f5815eb9e98cef03fa916ab4500513994df9e5"
|
268
293
|
dependencies = [
|
269
294
|
"fnv",
|
270
295
|
"ident_case",
|
@@ -276,9 +301,9 @@ dependencies = [
|
|
276
301
|
|
277
302
|
[[package]]
|
278
303
|
name = "darling_macro"
|
279
|
-
version = "0.20.
|
304
|
+
version = "0.20.10"
|
280
305
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
281
|
-
checksum = "
|
306
|
+
checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806"
|
282
307
|
dependencies = [
|
283
308
|
"darling_core",
|
284
309
|
"quote",
|
@@ -294,37 +319,6 @@ dependencies = [
|
|
294
319
|
"powerfmt",
|
295
320
|
]
|
296
321
|
|
297
|
-
[[package]]
|
298
|
-
name = "derive_builder"
|
299
|
-
version = "0.20.0"
|
300
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
301
|
-
checksum = "0350b5cb0331628a5916d6c5c0b72e97393b8b6b03b47a9284f4e7f5a405ffd7"
|
302
|
-
dependencies = [
|
303
|
-
"derive_builder_macro",
|
304
|
-
]
|
305
|
-
|
306
|
-
[[package]]
|
307
|
-
name = "derive_builder_core"
|
308
|
-
version = "0.20.0"
|
309
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
310
|
-
checksum = "d48cda787f839151732d396ac69e3473923d54312c070ee21e9effcaa8ca0b1d"
|
311
|
-
dependencies = [
|
312
|
-
"darling",
|
313
|
-
"proc-macro2",
|
314
|
-
"quote",
|
315
|
-
"syn",
|
316
|
-
]
|
317
|
-
|
318
|
-
[[package]]
|
319
|
-
name = "derive_builder_macro"
|
320
|
-
version = "0.20.0"
|
321
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
322
|
-
checksum = "206868b8242f27cecce124c19fd88157fbd0dd334df2587f36417bafbc85097b"
|
323
|
-
dependencies = [
|
324
|
-
"derive_builder_core",
|
325
|
-
"syn",
|
326
|
-
]
|
327
|
-
|
328
322
|
[[package]]
|
329
323
|
name = "deunicode"
|
330
324
|
version = "1.6.0"
|
@@ -627,11 +621,21 @@ version = "0.2.0"
|
|
627
621
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
628
622
|
checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391"
|
629
623
|
|
624
|
+
[[package]]
|
625
|
+
name = "prettyplease"
|
626
|
+
version = "0.2.25"
|
627
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
628
|
+
checksum = "64d1ec885c64d0457d564db4ec299b2dae3f9c02808b8ad9c3a089c591b18033"
|
629
|
+
dependencies = [
|
630
|
+
"proc-macro2",
|
631
|
+
"syn",
|
632
|
+
]
|
633
|
+
|
630
634
|
[[package]]
|
631
635
|
name = "proc-macro2"
|
632
|
-
version = "1.0.
|
636
|
+
version = "1.0.92"
|
633
637
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
634
|
-
checksum = "
|
638
|
+
checksum = "37d3544b3f2748c54e147655edb5025752e2303145b5aefb3c3ea2c78b973bb0"
|
635
639
|
dependencies = [
|
636
640
|
"unicode-ident",
|
637
641
|
]
|
@@ -725,6 +729,12 @@ version = "1.1.0"
|
|
725
729
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
726
730
|
checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2"
|
727
731
|
|
732
|
+
[[package]]
|
733
|
+
name = "rustversion"
|
734
|
+
version = "1.0.18"
|
735
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
736
|
+
checksum = "0e819f2bc632f285be6d7cd36e25940d45b2391dd6d9b939e79de557f7014248"
|
737
|
+
|
728
738
|
[[package]]
|
729
739
|
name = "ryu"
|
730
740
|
version = "1.0.18"
|
@@ -813,9 +823,9 @@ checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f"
|
|
813
823
|
|
814
824
|
[[package]]
|
815
825
|
name = "syn"
|
816
|
-
version = "2.0.
|
826
|
+
version = "2.0.89"
|
817
827
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
818
|
-
checksum = "
|
828
|
+
checksum = "44d46482f1c1c87acd84dea20c1bf5ebff4c757009ed6bf19cfd36fb10e92c4e"
|
819
829
|
dependencies = [
|
820
830
|
"proc-macro2",
|
821
831
|
"quote",
|
data/README.md
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
Implements GLFM (as used by GitLab) using the Rust-based markdown parser [comrak](https://github.com/kivikakk/comrak)
|
7
7
|
and providing a Ruby interface.\
|
8
|
-
_Currently using `comrak 0.
|
8
|
+
_Currently using `comrak 0.31.0`_.
|
9
9
|
|
10
10
|
This project is still in constant flux, so interfaces and functionality can change at any time.
|
11
11
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
[package]
|
2
2
|
name = "glfm_markdown"
|
3
|
-
version = "0.0.
|
3
|
+
version = "0.0.23"
|
4
4
|
edition = "2021"
|
5
5
|
authors = ["digitalmoksha <bwalker@gitlab.com>"]
|
6
6
|
description = "GitLab Flavored Markdown parser and formatter. 100% CommonMark-compatible. Experimental."
|
@@ -15,7 +15,7 @@ required-features = ["cli"]
|
|
15
15
|
|
16
16
|
[dependencies]
|
17
17
|
clap = { version = "4.0", optional = true, features = ["derive", "string"] }
|
18
|
-
comrak = { version = "0.
|
18
|
+
comrak = { version = "0.31.0", default-features = false, features = ["shortcodes"] }
|
19
19
|
magnus = "0.6.2"
|
20
20
|
rb-sys = { version = "0.9.86", default-features = false, features = ["stable-api-compiled-fallback"] }
|
21
21
|
|
@@ -27,6 +27,7 @@ pub struct RenderOptions {
|
|
27
27
|
pub smart: bool,
|
28
28
|
pub spoiler: bool,
|
29
29
|
pub strikethrough: bool,
|
30
|
+
pub subscript: bool,
|
30
31
|
pub superscript: bool,
|
31
32
|
// pub syntax_highlighting: String,
|
32
33
|
pub table: bool,
|
@@ -59,6 +60,7 @@ fn render_comrak(text: String, options: RenderOptions) -> String {
|
|
59
60
|
comrak_options.extension.shortcodes = options.gemojis;
|
60
61
|
comrak_options.extension.spoiler = options.spoiler;
|
61
62
|
comrak_options.extension.strikethrough = options.strikethrough;
|
63
|
+
comrak_options.extension.subscript = options.subscript;
|
62
64
|
comrak_options.extension.superscript = options.superscript;
|
63
65
|
comrak_options.extension.table = options.table;
|
64
66
|
comrak_options.extension.tagfilter = options.tagfilter;
|
@@ -42,6 +42,7 @@ pub fn render_to_html_rs(text: String, options: RHash) -> String {
|
|
42
42
|
smart: get_bool_opt("smart", options),
|
43
43
|
spoiler: get_bool_opt("spoiler", options),
|
44
44
|
strikethrough: get_bool_opt("strikethrough", options),
|
45
|
+
subscript: get_bool_opt("subscript", options),
|
45
46
|
superscript: get_bool_opt("superscript", options),
|
46
47
|
// syntax_highlighting: get_string_opt("syntax_highlighting", options),
|
47
48
|
table: get_bool_opt("table", options),
|
@@ -118,6 +118,10 @@ struct Args {
|
|
118
118
|
#[arg(long)]
|
119
119
|
strikethrough: bool,
|
120
120
|
|
121
|
+
/// Enable 'subscript' extension
|
122
|
+
#[arg(long)]
|
123
|
+
subscript: bool,
|
124
|
+
|
121
125
|
/// Enable 'superscript' extension
|
122
126
|
#[arg(long)]
|
123
127
|
superscript: bool,
|
@@ -200,6 +204,7 @@ fn main() {
|
|
200
204
|
smart: cli.smart,
|
201
205
|
spoiler: cli.spoiler,
|
202
206
|
strikethrough: cli.strikethrough,
|
207
|
+
subscript: cli.subscript,
|
203
208
|
superscript: cli.superscript,
|
204
209
|
// syntax_highlighting:
|
205
210
|
table: cli.table,
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gitlab-glfm-markdown
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.23
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brett Walker
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-12-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rb_sys
|