gitlab-glfm-markdown 0.0.45 → 0.0.47
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 +4 -4
- data/Cargo.lock +3 -3
- data/README.md +13 -3
- data/ext/gitlab_glfm_markdown/Cargo.toml +2 -2
- data/ext/gitlab_glfm_markdown/src/glfm.rs +1 -0
- data/lib/gitlab_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: 1e301cb75e5f8cfe5849701676319010a0ee73209942a80e084751202b0a65fb
|
|
4
|
+
data.tar.gz: 5b888ebfe2f59c7f5489e899beefd5513066b74055f1609c759618267daef397
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 9dc0786a85827e59c683e7ad2e46e1992dfcbbb4cf71150d55690d71a3c5a6ba873c97b3e9a0111b84dd1a15cddc90f693bd68dbdd7c3a9ca2bb8fb82b061916
|
|
7
|
+
data.tar.gz: 9fca0669812cca3c3bfd290579dd9aeec0083382737005788d9b207a37f0a4038cf7cef4fb58ba281df0f739ac512a43260b9f778e0a54f38a140332f1fb825c
|
data/Cargo.lock
CHANGED
|
@@ -220,9 +220,9 @@ checksum = "b05b61dc5112cbb17e4b6cd61790d9845d13888356391624cbe7e41efeac1e75"
|
|
|
220
220
|
|
|
221
221
|
[[package]]
|
|
222
222
|
name = "comrak"
|
|
223
|
-
version = "0.
|
|
223
|
+
version = "0.59.0"
|
|
224
224
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
225
|
-
checksum = "
|
|
225
|
+
checksum = "3adf553d37681e21753316065ad5a763d9513f81c910e250576c572114a8eb06"
|
|
226
226
|
dependencies = [
|
|
227
227
|
"caseless",
|
|
228
228
|
"emojis",
|
|
@@ -345,7 +345,7 @@ checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1"
|
|
|
345
345
|
|
|
346
346
|
[[package]]
|
|
347
347
|
name = "gitlab-glfm-markdown"
|
|
348
|
-
version = "0.0.
|
|
348
|
+
version = "0.0.47"
|
|
349
349
|
dependencies = [
|
|
350
350
|
"clap",
|
|
351
351
|
"comrak",
|
data/README.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
[](https://gitlab.com/gitlab-org/ruby/gems/gitlab-glfm-markdown/-/releases)
|
|
5
5
|
|
|
6
6
|
Implements GLFM (as used by GitLab) using the Rust-based Markdown parser
|
|
7
|
-
[Comrak](https://github.com/kivikakk/comrak) (0.
|
|
7
|
+
[Comrak](https://github.com/kivikakk/comrak) (0.59.0), providing a Ruby interface.
|
|
8
8
|
|
|
9
9
|
This project is still in constant flux, so interfaces and functionality can change at any time.
|
|
10
10
|
|
|
@@ -37,16 +37,25 @@ require 'gitlab-glfm-markdown'
|
|
|
37
37
|
GLFMMarkdown.to_html('# header', options: { sourcepos: true })
|
|
38
38
|
```
|
|
39
39
|
|
|
40
|
+
An option you do not pass is off. Pass `glfm: true` to start from the
|
|
41
|
+
defaults in `GLFMMarkdown::GLFM_DEFAULT_OPTIONS` instead; the options you
|
|
42
|
+
pass are merged over them, so here `sourcepos: false` turns off a default:
|
|
43
|
+
|
|
44
|
+
```ruby
|
|
45
|
+
GLFMMarkdown.to_html('# header', options: { glfm: true, sourcepos: false })
|
|
46
|
+
```
|
|
47
|
+
|
|
40
48
|
### Options
|
|
41
49
|
|
|
42
50
|
| Option name | Description |
|
|
43
51
|
|-------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
|
52
|
+
| `alerts` | Enable the `alerts` extension - render GitHub-style alerts such as `> [!note]` and `> [!warning]` |
|
|
44
53
|
| `autolink` | Enable the `autolink` extension |
|
|
45
54
|
| `cjk_friendly_emphasis` | Enable the [`cjk_friendly_emphasis` extension](https://github.com/tats-u/markdown-cjk-friendly) |
|
|
46
55
|
| `default_html` | Disables any custom HTML, and returns default HTML from `comrak` |
|
|
47
56
|
| `description_lists` | Enable the `description-lists` extension |
|
|
48
|
-
| `escape_char_spans` | Wrap escaped characters in a `<span>` to allow any post-processing to recognize them |
|
|
49
57
|
| `escape` | Escape raw HTML instead of clobbering it |
|
|
58
|
+
| `escaped_char_spans` | Wrap escaped characters in a `<span>` to allow any post-processing to recognize them |
|
|
50
59
|
| `figure_with_caption` | Render the image as a figure element with the title as its caption |
|
|
51
60
|
| `footnotes` | Enable the `footnotes` extension |
|
|
52
61
|
| `full_info_string` | Enable full info strings for code blocks |
|
|
@@ -73,6 +82,7 @@ GLFMMarkdown.to_html('# header', options: { sourcepos: true })
|
|
|
73
82
|
| `sourcepos` | Include source mappings in HTML attributes |
|
|
74
83
|
| `spoiler` | Enable the `spoiler` extension - use double vertical bars |
|
|
75
84
|
| `strikethrough` | Enable the `strikethrough` extension |
|
|
85
|
+
| `subscript` | Enable the `subscript` extension - use single tildes, as in `H~2~O`. When `strikethrough` is also set, only double tildes strike through |
|
|
76
86
|
| `superscript` | Enable the `superscript` extension |
|
|
77
87
|
| `table` | Enable the `table` extension |
|
|
78
88
|
| `tasklist_classes` | Output classes on tasklist elements so that they can be styled with CSS |
|
|
@@ -111,7 +121,7 @@ should be followed.
|
|
|
111
121
|
|
|
112
122
|
### Releasing a new version
|
|
113
123
|
|
|
114
|
-
To release a new version, create a merge request and use the `Release` template, following
|
|
124
|
+
To release a new version, create a merge request and use the `Release` template, following its instructions.
|
|
115
125
|
|
|
116
126
|
Once merged, the new version with precompiled, native gems will automatically be
|
|
117
127
|
published to [RubyGems](https://rubygems.org/gems/gitlab-glfm-markdown).
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[package]
|
|
2
2
|
name = "gitlab-glfm-markdown"
|
|
3
|
-
version = "0.0.
|
|
3
|
+
version = "0.0.47"
|
|
4
4
|
edition = "2021"
|
|
5
5
|
authors = ["digitalmoksha <bwalker@gitlab.com>", "Asherah Connor <aconnor@gitlab.com>"]
|
|
6
6
|
description = "GitLab Flavored Markdown parser and formatter. 100% CommonMark-compatible."
|
|
@@ -15,7 +15,7 @@ required-features = ["cli"]
|
|
|
15
15
|
|
|
16
16
|
[dependencies]
|
|
17
17
|
clap = { version = "=4.4.18", optional = true, features = ["derive", "string"] }
|
|
18
|
-
comrak = { version = "0.
|
|
18
|
+
comrak = { version = "0.59.0", default-features = false, features = ["shortcodes"] }
|
|
19
19
|
magnus = "0.8.2"
|
|
20
20
|
rb-sys = { version = "0.9.124", default-features = false, features = ["stable-api-compiled-fallback"] }
|
|
21
21
|
regex = "1.11.1"
|
|
@@ -94,6 +94,7 @@ impl From<&RenderOptions> for comrak::Options<'_> {
|
|
|
94
94
|
comrak_options.extension.underline = options.underline;
|
|
95
95
|
comrak_options.extension.wikilinks_title_after_pipe = options.wikilinks_title_after_pipe;
|
|
96
96
|
comrak_options.extension.wikilinks_title_before_pipe = options.wikilinks_title_before_pipe;
|
|
97
|
+
comrak_options.extension.wikilinks_ignore_embeds = true;
|
|
97
98
|
|
|
98
99
|
comrak_options.render.escape = options.escape;
|
|
99
100
|
comrak_options.render.escaped_char_spans = options.escaped_char_spans;
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
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.47
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Brett Walker
|
|
@@ -9,7 +9,7 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date: 2026-10-
|
|
12
|
+
date: 2026-10-26 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: rb_sys
|