gitlab-glfm-markdown 0.0.24-x86_64-darwin → 0.0.25-x86_64-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: 1bc5aa4a6000eabb07395b3def5dc416343e2c40e43b57546159a76e618fe07e
4
- data.tar.gz: '066999f23c14f560f7874d05f69fb0b8f2d065b50aee265e5ca736ced21711d6'
3
+ metadata.gz: b0f8d6faa57aa5c6a70f1e3134fc9bac6f831fb6a837353538740ee04ffea7cd
4
+ data.tar.gz: 92ad4dee3b4d130364d9575d41b2ff15d11b6ea2626f908e9450ec2ba39ac157
5
5
  SHA512:
6
- metadata.gz: b72fe2e2c58744e1c98d1a1b4a206ce551d8e9f4040f0d82af5e332c32cb7a8027860c6b76e309e342014070143212cdf7895a2dcd4760d12f15fd5f7e7e56b4
7
- data.tar.gz: 35a3fd0dc1ced04b1b0bc26bbd863ab6c7a234595ba5861777a7b567487d7b8f3e4d698d5305a41aabee568fedf2418bd460aece9f6eed5ca638fa41bf303dac
6
+ metadata.gz: e01c7107fe79ff4641d3be7a6956309ce89804eae066894fb2144dccbcd7d946ecb6fa34b62713c5db21360cf6393952d4cdf0a033912607faa15a639a9ba3e5
7
+ data.tar.gz: 93f4555ff01fce8ae352c6880a05e30e451ab79db68b4a12683b73e364bde05fb779ed80b6d1fc96499124451f1b05d61d0577fce16a114f6b8b0feb9b0edcc1
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.34.0"
255
230
  source = "registry+https://github.com/rust-lang/crates.io-index"
256
- checksum = "453dcb42e33f7b474d7e0db12e0b8d82802c88f35cf5a1d8c297d0dfcecb154f"
231
+ checksum = "1664eb8abab93a9c09d1e85df10b4de6af0b4c738f267750b211a77a771447fe"
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.25"
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.34.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.25"
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.34.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.25'
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.25
5
5
  platform: x86_64-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-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rb_sys