gitlab-glfm-markdown 0.0.24-arm64-darwin → 0.0.26-arm64-darwin

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e3a7aa4cf5d45a56a69f77df0146eccd746b6e99cb2412419c16ab583a18438e
4
- data.tar.gz: 3c9c9ae68a00583debcd2a866038b6c0256a98df2c479f252b8a996f669b470b
3
+ metadata.gz: 53e8218f7bf58cc70b1da942a969532ee55d3d37bf6d93fc50117308a5f8a73a
4
+ data.tar.gz: 146cf648955b9111b3dfffdcca88c92f6217980d19d92122f68cb89007e601f5
5
5
  SHA512:
6
- metadata.gz: 0c4c094702a2ffb7b9d3c8ba3ddb9aea1457eb63eba907125da38d49ddc2c58517aa2097244ff94e89441e59870d7148ca4c388be41ed9f37c90ef07a9e403bb
7
- data.tar.gz: abdb033c7938d119027863a8ee828445cb26be0cc5d29f7f6d1501e60648e168099c8e34ef3f194f1c2157ecefcb3ecd7160dff69d3a9308f3665aa509e9e50e
6
+ metadata.gz: 4fd4ea838dab633f606f6cda059baea933d0f3e35f97cb552394febf2efa31c89dfc9347342a7d90cc070bf18ed2d747088f5da67f1e7163515da9399bcb5c19
7
+ data.tar.gz: 85e32b9dbd6a19756de36f788b3ad698703b1debcd7701209ded41d3cd23dba93a758c6d04ac7b52ea3669f1e13e8c2f3b664251bb8e81e7c479a9bee89b8c9e
data/Cargo.lock CHANGED
@@ -128,31 +128,6 @@ version = "2.7.0"
128
128
  source = "registry+https://github.com/rust-lang/crates.io-index"
129
129
  checksum = "1be3f42a67d6d345ecd59f675f3f012d6974981560836e938c22b424b85ce1be"
130
130
 
131
- [[package]]
132
- name = "bon"
133
- version = "3.3.2"
134
- source = "registry+https://github.com/rust-lang/crates.io-index"
135
- checksum = "fe7acc34ff59877422326db7d6f2d845a582b16396b6b08194942bf34c6528ab"
136
- dependencies = [
137
- "bon-macros",
138
- "rustversion",
139
- ]
140
-
141
- [[package]]
142
- name = "bon-macros"
143
- version = "3.3.2"
144
- source = "registry+https://github.com/rust-lang/crates.io-index"
145
- checksum = "4159dd617a7fbc9be6a692fe69dc2954f8e6bb6bb5e4d7578467441390d77fd0"
146
- dependencies = [
147
- "darling",
148
- "ident_case",
149
- "prettyplease",
150
- "proc-macro2",
151
- "quote",
152
- "rustversion",
153
- "syn",
154
- ]
155
-
156
131
  [[package]]
157
132
  name = "bumpalo"
158
133
  version = "3.16.0"
@@ -251,17 +226,14 @@ checksum = "5b63caa9aa9397e2d9480a9b13673856c78d8ac123288526c37d7839f2a86990"
251
226
 
252
227
  [[package]]
253
228
  name = "comrak"
254
- version = "0.31.0"
229
+ version = "0.35.0"
255
230
  source = "registry+https://github.com/rust-lang/crates.io-index"
256
- checksum = "453dcb42e33f7b474d7e0db12e0b8d82802c88f35cf5a1d8c297d0dfcecb154f"
231
+ checksum = "52602e10393cfaaf8accaf707f2da743dc22cbe700a343ff8dbc9e5e04bc6b74"
257
232
  dependencies = [
258
- "bon",
259
233
  "caseless",
260
234
  "emojis",
261
235
  "entities",
262
236
  "memchr",
263
- "once_cell",
264
- "regex",
265
237
  "slug",
266
238
  "syntect",
267
239
  "typed-arena",
@@ -277,41 +249,6 @@ dependencies = [
277
249
  "cfg-if",
278
250
  ]
279
251
 
280
- [[package]]
281
- name = "darling"
282
- version = "0.20.10"
283
- source = "registry+https://github.com/rust-lang/crates.io-index"
284
- checksum = "6f63b86c8a8826a49b8c21f08a2d07338eec8d900540f8630dc76284be802989"
285
- dependencies = [
286
- "darling_core",
287
- "darling_macro",
288
- ]
289
-
290
- [[package]]
291
- name = "darling_core"
292
- version = "0.20.10"
293
- source = "registry+https://github.com/rust-lang/crates.io-index"
294
- checksum = "95133861a8032aaea082871032f5815eb9e98cef03fa916ab4500513994df9e5"
295
- dependencies = [
296
- "fnv",
297
- "ident_case",
298
- "proc-macro2",
299
- "quote",
300
- "strsim",
301
- "syn",
302
- ]
303
-
304
- [[package]]
305
- name = "darling_macro"
306
- version = "0.20.10"
307
- source = "registry+https://github.com/rust-lang/crates.io-index"
308
- checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806"
309
- dependencies = [
310
- "darling_core",
311
- "quote",
312
- "syn",
313
- ]
314
-
315
252
  [[package]]
316
253
  name = "deranged"
317
254
  version = "0.3.11"
@@ -382,7 +319,7 @@ checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1"
382
319
 
383
320
  [[package]]
384
321
  name = "glfm_markdown"
385
- version = "0.0.24"
322
+ version = "0.0.26"
386
323
  dependencies = [
387
324
  "clap",
388
325
  "comrak",
@@ -408,12 +345,6 @@ version = "0.5.0"
408
345
  source = "registry+https://github.com/rust-lang/crates.io-index"
409
346
  checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea"
410
347
 
411
- [[package]]
412
- name = "ident_case"
413
- version = "1.0.1"
414
- source = "registry+https://github.com/rust-lang/crates.io-index"
415
- checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39"
416
-
417
348
  [[package]]
418
349
  name = "indexmap"
419
350
  version = "2.7.0"
@@ -616,16 +547,6 @@ version = "0.2.0"
616
547
  source = "registry+https://github.com/rust-lang/crates.io-index"
617
548
  checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391"
618
549
 
619
- [[package]]
620
- name = "prettyplease"
621
- version = "0.2.27"
622
- source = "registry+https://github.com/rust-lang/crates.io-index"
623
- checksum = "483f8c21f64f3ea09fe0f30f5d48c3e8eefe5dac9129f0075f76593b4c1da705"
624
- dependencies = [
625
- "proc-macro2",
626
- "syn",
627
- ]
628
-
629
550
  [[package]]
630
551
  name = "proc-macro2"
631
552
  version = "1.0.93"
@@ -718,12 +639,6 @@ version = "1.1.0"
718
639
  source = "registry+https://github.com/rust-lang/crates.io-index"
719
640
  checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2"
720
641
 
721
- [[package]]
722
- name = "rustversion"
723
- version = "1.0.19"
724
- source = "registry+https://github.com/rust-lang/crates.io-index"
725
- checksum = "f7c45b9784283f1b2e7fb61b42047c2fd678ef0960d4f6f1eba131594cc369d4"
726
-
727
642
  [[package]]
728
643
  name = "ryu"
729
644
  version = "1.0.18"
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.31.0`_.
8
+ _Currently using `comrak 0.35.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.24"
3
+ version = "0.0.26"
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.31.0", default-features = false, features = ["shortcodes"] }
18
+ comrak = { version = "0.35.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
 
@@ -1,5 +1,6 @@
1
1
  #[derive(Debug)]
2
2
  pub struct RenderOptions {
3
+ pub alerts: bool,
3
4
  pub autolink: bool,
4
5
  // pub default_info_string: String,
5
6
  pub description_lists: bool,
@@ -48,6 +49,7 @@ pub fn render(text: String, options: RenderOptions) -> String {
48
49
  fn render_comrak(text: String, options: RenderOptions) -> String {
49
50
  let mut comrak_options = comrak::ComrakOptions::default();
50
51
 
52
+ comrak_options.extension.alerts = options.alerts;
51
53
  comrak_options.extension.autolink = options.autolink;
52
54
  comrak_options.extension.description_lists = options.description_lists;
53
55
  comrak_options.extension.footnotes = options.footnotes;
@@ -15,6 +15,7 @@ fn get_string_opt(arg: &str, options: RHash) -> Option<String> {
15
15
 
16
16
  pub fn render_to_html_rs(text: String, options: RHash) -> String {
17
17
  let render_options = RenderOptions {
18
+ alerts: get_bool_opt("alerts", options),
18
19
  autolink: get_bool_opt("autolink", options),
19
20
  // default_info_string: get_string_opt("default_info_string", options),
20
21
  description_lists: get_bool_opt("description_lists", options),
@@ -12,6 +12,10 @@ struct Args {
12
12
  #[arg(value_name = "FILE")]
13
13
  file: Option<String>,
14
14
 
15
+ /// Enable 'alerts' extension
16
+ #[arg(long)]
17
+ alerts: bool,
18
+
15
19
  /// Enable 'autolink' extension
16
20
  #[arg(long)]
17
21
  autolink: bool,
@@ -178,6 +182,7 @@ fn main() {
178
182
 
179
183
  let source = String::from_utf8_lossy(&s);
180
184
  let options = RenderOptions {
185
+ alerts: cli.alerts,
181
186
  autolink: cli.autolink,
182
187
  // default_info_string:
183
188
  description_lists: cli.description_lists,
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module GLFMMarkdown
4
- VERSION = '0.0.24'
4
+ VERSION = '0.0.26'
5
5
  end
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.24
4
+ version: 0.0.26
5
5
  platform: arm64-darwin
6
6
  authors:
7
7
  - Brett Walker
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-01-15 00:00:00.000000000 Z
11
+ date: 2025-01-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rb_sys