gitlab-glfm-markdown 0.0.10-x86_64-darwin → 0.0.12-x86_64-darwin

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c4886fc3a3fcb9cd60b207fdb795dbc816644d3fdf03c27e15075047dcef8264
4
- data.tar.gz: 0156bdf859080843dd545cef1c04c47b985c8615a25e3da9e91ecb3a2d72632a
3
+ metadata.gz: 006efb85e12aba2c54396197c1ada6ac0dba717aefb122de9b727be1e0a920fa
4
+ data.tar.gz: 96c07fa51dfe0a591416be56e8f0f2c5997106dc6d2622a4e851d187b766222d
5
5
  SHA512:
6
- metadata.gz: 31c096bf9a20a16730e89493c97081b1f311e8eed1aca2742c4b2b15f3ade446f32a8097acf5d5b663cfa3402c20734a3bc0faa7a945bbb933c9e0d6f7afe2ea
7
- data.tar.gz: 760358db76975788949339da3d82a07f8e3185b8345227815701227a2b52388f1661f8c33789d446f371aa603a7566d775125dfb361ff5ae2267fb7a54b8b8a7
6
+ metadata.gz: e0510dc264ba9964666c44d51eaa2190b899a51da30688ace31c44ee1f631470143187c6e14f548a845f4b9d0b1168feca098c9ea60c08f77c4daac4ea9cdb29
7
+ data.tar.gz: 34b905c2514793f599bfd4d5359989e2c8f41ca9bc831cdda057c09725f32e6ddf44d1cc1da85a7fca2214c47c39925ceb73fdc2229d04f9982f1149e1aee02a
data/Cargo.lock CHANGED
@@ -216,9 +216,9 @@ checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7"
216
216
 
217
217
  [[package]]
218
218
  name = "comrak"
219
- version = "0.20.0"
219
+ version = "0.21.0"
220
220
  source = "registry+https://github.com/rust-lang/crates.io-index"
221
- checksum = "9f18e72341e6cdc7489cffb76f993812a14a906db54dedb020044ccc211dcaae"
221
+ checksum = "6751998a48e2327773c95f6f8e03c6e77c0156ce539d74c17d2199ff3d05e197"
222
222
  dependencies = [
223
223
  "derive_builder",
224
224
  "entities",
@@ -361,7 +361,7 @@ checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1"
361
361
 
362
362
  [[package]]
363
363
  name = "glfm_markdown"
364
- version = "0.0.8"
364
+ version = "0.0.12"
365
365
  dependencies = [
366
366
  "clap",
367
367
  "comrak",
data/README.md CHANGED
@@ -28,6 +28,12 @@ bin/console
28
28
  GLFMMarkdown.to_html('# header', options: { glfm: true })
29
29
  ```
30
30
 
31
+ ## Dingus / Demo
32
+
33
+ A demo is running via GitLab Pages, and can be accessed at:
34
+
35
+ https://gitlab-org.gitlab.io/ruby/gems/gitlab-glfm-markdown
36
+
31
37
  ## Development
32
38
 
33
39
  A command line executable can be built for debugging.
@@ -1,6 +1,6 @@
1
1
  [package]
2
2
  name = "glfm_markdown"
3
- version = "0.0.8"
3
+ version = "0.0.12"
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.20.0", default-features = false }
18
+ comrak = { version = "0.21.0", default-features = false }
19
19
  magnus = "0.6.2"
20
20
  rb-sys = { version = "0.9.86", default-features = false, features = ["stable-api-compiled-fallback"] }
21
21
 
@@ -3,6 +3,6 @@
3
3
  require 'mkmf'
4
4
  require 'rb_sys/mkmf'
5
5
 
6
- create_rust_makefile('glfm_markdown') do |r|
6
+ create_rust_makefile('glfm_markdown/glfm_markdown') do |r|
7
7
  r.auto_install_rust_toolchain = false
8
8
  end
@@ -7,6 +7,7 @@ pub struct RenderOptions {
7
7
  pub full_info_string: bool,
8
8
  pub github_pre_lang: bool,
9
9
  pub hardbreaks: bool,
10
+ pub multiline_block_quotes: bool,
10
11
  pub relaxed_autolinks: bool,
11
12
  pub relaxed_tasklist_character: bool,
12
13
  pub sourcepos: bool,
@@ -31,6 +32,7 @@ fn render_comrak(text: String, options: RenderOptions) -> String {
31
32
  comrak_options.extension.autolink = options.autolink;
32
33
  comrak_options.extension.description_lists = options.description_lists;
33
34
  comrak_options.extension.footnotes = options.footnotes;
35
+ comrak_options.extension.multiline_block_quotes = options.multiline_block_quotes;
34
36
  comrak_options.extension.strikethrough = options.strikethrough;
35
37
  comrak_options.extension.superscript = options.superscript;
36
38
  comrak_options.extension.table = options.table;
@@ -18,6 +18,7 @@ pub fn render_to_html_rs(text: String, options: RHash) -> String {
18
18
  full_info_string: get_opt("full_info_string", options),
19
19
  github_pre_lang: get_opt("github_pre_lang", options),
20
20
  hardbreaks: get_opt("hardbreaks", options),
21
+ multiline_block_quotes: get_opt("multiline_block_quotes", options),
21
22
  relaxed_autolinks: get_opt("relaxed_autolinks", options),
22
23
  relaxed_tasklist_character: get_opt("relaxed_tasklist_character", options),
23
24
  sourcepos: get_opt("sourcepos", options),
@@ -2,7 +2,7 @@
2
2
 
3
3
  def load_rust_extension
4
4
  ruby_version = /(\d+\.\d+)/.match(RUBY_VERSION)
5
- require_relative "./#{ruby_version}/glfm_markdown"
5
+ require "glfm_markdown/#{ruby_version}/glfm_markdown"
6
6
  rescue LoadError
7
7
  require 'glfm_markdown/glfm_markdown'
8
8
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module GLFMMarkdown
4
- VERSION = '0.0.10'
4
+ VERSION = '0.0.12'
5
5
  end
data/lib/glfm_markdown.rb CHANGED
@@ -5,25 +5,26 @@ require_relative 'glfm_markdown/loader'
5
5
 
6
6
  load_rust_extension
7
7
 
8
- GLFM_DEFAULT_OPTIONS = {
9
- autolink: true,
10
- footnotes: true,
11
- full_info_string: true,
12
- github_pre_lang: false,
13
- hardbreaks: false,
14
- relaxed_autolinks: false,
15
- sourcepos: true,
16
- smart: false,
17
- strikethrough: true,
18
- table: true,
19
- tagfilter: false,
20
- tasklist: true,
21
- unsafe: true,
8
+ module GLFMMarkdown
9
+ GLFM_DEFAULT_OPTIONS = {
10
+ autolink: true,
11
+ footnotes: true,
12
+ full_info_string: true,
13
+ github_pre_lang: false,
14
+ hardbreaks: false,
15
+ multiline_block_quotes: true,
16
+ relaxed_autolinks: false,
17
+ sourcepos: true,
18
+ smart: false,
19
+ strikethrough: true,
20
+ table: true,
21
+ tagfilter: false,
22
+ tasklist: true,
23
+ unsafe: true,
22
24
 
23
- debug: false
24
- }.freeze
25
+ debug: false
26
+ }.freeze
25
27
 
26
- module GLFMMarkdown
27
28
  class << self
28
29
  def to_html(markdown, options: {})
29
30
  raise TypeError, 'markdown must be a String' unless markdown.is_a?(String)
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.10
4
+ version: 0.0.12
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: 2024-01-04 00:00:00.000000000 Z
11
+ date: 2024-01-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rb_sys