gitlab-glfm-markdown 0.0.41 → 7.0.1
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.
Potentially problematic release.
This version of gitlab-glfm-markdown might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/lib/gitlab-glfm-markdown.rb +9 -61
- metadata +12 -73
- data/Cargo.lock +0 -966
- data/LICENSE +0 -28
- data/README.md +0 -120
- data/ext/gitlab_glfm_markdown/Cargo.lock +0 -1
- data/ext/gitlab_glfm_markdown/Cargo.toml +0 -27
- data/ext/gitlab_glfm_markdown/extconf.rb +0 -10
- data/ext/gitlab_glfm_markdown/src/formatter.rs +0 -546
- data/ext/gitlab_glfm_markdown/src/glfm.rs +0 -136
- data/ext/gitlab_glfm_markdown/src/lib.rs +0 -52
- data/ext/gitlab_glfm_markdown/src/main.rs +0 -272
- data/lib/gitlab_glfm_markdown/loader.rb +0 -8
- data/lib/gitlab_glfm_markdown/version.rb +0 -5
data/LICENSE
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
Copyright (c) 2011-present GitLab B.V.
|
|
2
|
-
|
|
3
|
-
Portions of this software are licensed as follows:
|
|
4
|
-
|
|
5
|
-
* All content residing under the "doc/" directory of this repository is licensed under "Creative Commons: CC BY-SA 4.0 license".
|
|
6
|
-
* All content that resides under the "ee/" directory of this repository, if that directory exists, is licensed under the license defined in "ee/LICENSE".
|
|
7
|
-
* All content that resides under the "jh/" directory of this repository, if that directory exists, is licensed under the license defined in "jh/LICENSE".
|
|
8
|
-
* All client-side JavaScript (when served directly or after being compiled, arranged, augmented, or combined), is licensed under the "MIT Expat" license.
|
|
9
|
-
* All third party components incorporated into the GitLab Software are licensed under the original license provided by the owner of the applicable component.
|
|
10
|
-
* Content outside of the above mentioned directories or restrictions above is available under the "MIT Expat" license as defined below.
|
|
11
|
-
|
|
12
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
13
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
14
|
-
in the Software without restriction, including without limitation the rights
|
|
15
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
16
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
17
|
-
furnished to do so, subject to the following conditions:
|
|
18
|
-
|
|
19
|
-
The above copyright notice and this permission notice shall be included in all
|
|
20
|
-
copies or substantial portions of the Software.
|
|
21
|
-
|
|
22
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
23
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
24
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
25
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
26
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
27
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
28
|
-
SOFTWARE.
|
data/README.md
DELETED
|
@@ -1,120 +0,0 @@
|
|
|
1
|
-
# GitLab Flavored Markdown
|
|
2
|
-
|
|
3
|
-
[](https://gitlab.com/gitlab-org/ruby/gems/gitlab-glfm-markdown/-/commits/main)
|
|
4
|
-
[](https://gitlab.com/gitlab-org/ruby/gems/gitlab-glfm-markdown/-/releases)
|
|
5
|
-
|
|
6
|
-
Implements GLFM (as used by GitLab) using the Rust-based Markdown parser
|
|
7
|
-
[Comrak](https://github.com/kivikakk/comrak) (0.49.0), providing a Ruby interface.
|
|
8
|
-
|
|
9
|
-
This project is still in constant flux, so interfaces and functionality can change at any time.
|
|
10
|
-
|
|
11
|
-
## Installation
|
|
12
|
-
|
|
13
|
-
Install the gem and add to the application's Gemfile by executing:
|
|
14
|
-
|
|
15
|
-
$ bundle add gitlab-glfm-markdown
|
|
16
|
-
|
|
17
|
-
If bundler is not being used to manage dependencies, install the gem by executing:
|
|
18
|
-
|
|
19
|
-
$ gem install gitlab-glfm-markdown
|
|
20
|
-
|
|
21
|
-
## Usage
|
|
22
|
-
|
|
23
|
-
Try on command line:
|
|
24
|
-
|
|
25
|
-
```
|
|
26
|
-
rake compile
|
|
27
|
-
bin/console
|
|
28
|
-
|
|
29
|
-
require 'gitlab-glfm-markdown'
|
|
30
|
-
|
|
31
|
-
GLFMMarkdown.to_html('# header', options: { sourcepos: true })
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
### Options
|
|
35
|
-
|
|
36
|
-
| Option name | Description |
|
|
37
|
-
|-------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
|
38
|
-
| `autolink` | Enable the `autolink` extension |
|
|
39
|
-
| `cjk_friendly_emphasis` | Enable the [`cjk_friendly_emphasis` extension](https://github.com/tats-u/markdown-cjk-friendly) |
|
|
40
|
-
| `default_html` | Disables any custom HTML, and returns default HTML from `comrak` |
|
|
41
|
-
| `description_lists` | Enable the `description-lists` extension |
|
|
42
|
-
| `escape_char_spans` | Wrap escaped characters in a `<span>` to allow any post-processing to recognize them |
|
|
43
|
-
| `escape` | Escape raw HTML instead of clobbering it |
|
|
44
|
-
| `figure_with_caption` | Render the image as a figure element with the title as its caption |
|
|
45
|
-
| `footnotes` | Enable the `footnotes` extension |
|
|
46
|
-
| `full_info_string` | Enable full info strings for code blocks |
|
|
47
|
-
| `gemojis` | Enable the `gemojis` extensions - translate gemojis into UTF-8 characters |
|
|
48
|
-
| `gfm_quirks` | Enables GFM-style quirks in output HTML, such as not nesting <strong> tags |
|
|
49
|
-
| `github_pre_lang` | Use GitHub-style `<pre lang>` for code blocks |
|
|
50
|
-
| `greentext` | Enable the `greentext` extension - requires at least one space after a `>` character to generate a blockquote, and restarts blockquote nesting across unique lines of input |
|
|
51
|
-
| `hardbreaks` | Treat newlines as hard line breaks |
|
|
52
|
-
| `header_accessibility` | Use new header/anchor combination in HTML output, per [!112](https://gitlab.com/gitlab-org/ruby/gems/gitlab-glfm-markdown/-/merge_requests/112). |
|
|
53
|
-
| `header_ids <PREFIX>` | Enable the `header-id` extension, with the given ID prefix |
|
|
54
|
-
| `ignore_empty_links` | Ignore empty links in input |
|
|
55
|
-
| `ignore_setext` | Ignore setext headings in input |
|
|
56
|
-
| `inapplicable_tasks` | Allow inapplicable tasks items. Must also set the `relaxed_tasklist_character` option. |
|
|
57
|
-
| `math_code` | Enables `math code` extension, using math code syntax |
|
|
58
|
-
| `math_dollars` | Enables `math dollars` extension, using math dollar syntax |
|
|
59
|
-
| `multiline_block_quotes` | Enable the `multiline-block-quotes` extension |
|
|
60
|
-
| `only_escape_chars <CHARS>` | When the 'escaped_char_spans' render option is enabled, only emit `<span data-escaped-char>` around the given characters. |
|
|
61
|
-
| `placeholder_detection` | Detect placeholder variables in the format `%{placeholder}` |
|
|
62
|
-
| `relaxed_autolinks` | Enable relaxing of autolink parsing, allowing links to be recognized when in brackets, with any scheme, and with dot-less hostnames |
|
|
63
|
-
| `relaxed_tasklist_character` | Enable relaxing which character is allowed in tasklists |
|
|
64
|
-
| `smart` | Use smart punctuation |
|
|
65
|
-
| `sourcepos` | Include source mappings in HTML attributes |
|
|
66
|
-
| `spoiler` | Enable the `spoiler` extension - use double vertical bars |
|
|
67
|
-
| `strikethrough` | Enable the `strikethrough` extension |
|
|
68
|
-
| `superscript` | Enable the `superscript` extension |
|
|
69
|
-
| `table` | Enable the `table` extension |
|
|
70
|
-
| `tagfilter` | Enable the `tagfilter` extension |
|
|
71
|
-
| `tasklist_classes` | Output classes on tasklist elements so that they can be styled with CSS |
|
|
72
|
-
| `tasklist_in_table` | Enables parsing tasklist items within tables when they're the only content of a table cell |
|
|
73
|
-
| `tasklist` | Enable the `tasklist` extension |
|
|
74
|
-
| `underline` | Enables the `underline` extension - use double underscores |
|
|
75
|
-
| `unsafe` | Allow raw HTML and dangerous URLs |
|
|
76
|
-
| `wikilinks_title_after_pipe` | Enable the `wikilinks_title_after_pipe` extension |
|
|
77
|
-
| `wikilinks_title_before_pipe` | Enable the `wikilinks_title_before_pipe` extension |
|
|
78
|
-
|
|
79
|
-
## Dingus / Demo
|
|
80
|
-
|
|
81
|
-
A demo is running via GitLab Pages, and can be accessed at:
|
|
82
|
-
|
|
83
|
-
https://gitlab-org.gitlab.io/ruby/gems/gitlab-glfm-markdown
|
|
84
|
-
|
|
85
|
-
## Development
|
|
86
|
-
|
|
87
|
-
A command line executable can be built for debugging.
|
|
88
|
-
|
|
89
|
-
```
|
|
90
|
-
cargo run --bin gitlab-glfm-markdown --features="cli" -- --help
|
|
91
|
-
cargo run --bin gitlab-glfm-markdown --features="cli" -- --sourcepos
|
|
92
|
-
```
|
|
93
|
-
|
|
94
|
-
There is a VSCode workspace that allows you to `Debug executable`
|
|
95
|
-
|
|
96
|
-
When developing another project locally and using `gitlab-glfm-markdown` by linking
|
|
97
|
-
directly to the gem's source directory, make sure that you're using the same version
|
|
98
|
-
of Ruby for the project and the gem. Otherwise you can see unexplained errors when
|
|
99
|
-
calling into the gem.
|
|
100
|
-
|
|
101
|
-
NOTE: This project generates a changelog automatically that gets attached to the release entry.
|
|
102
|
-
The normal [GitLab changelog entry process](https://docs.gitlab.com/development/changelog.html)
|
|
103
|
-
should be followed.
|
|
104
|
-
|
|
105
|
-
### Releasing a new version
|
|
106
|
-
|
|
107
|
-
To release a new version, create a merge request and use the `Release` template, following it's instructions.
|
|
108
|
-
|
|
109
|
-
Once merged, the new version with precompiled, native gems will automatically be
|
|
110
|
-
published to [RubyGems](https://rubygems.org/gems/gitlab-glfm-markdown).
|
|
111
|
-
|
|
112
|
-
## Contributing
|
|
113
|
-
|
|
114
|
-
Bug reports and merge requests are welcome on GitLab at https://gitlab.com/gitlab-org/ruby/gems/gitlab-glfm-markdown.
|
|
115
|
-
|
|
116
|
-
Visit the [Community Contribute](https://about.gitlab.com/community/contribute/)
|
|
117
|
-
page for general information about contributing to GitLab, and using the
|
|
118
|
-
[community fork](https://gitlab.com/gitlab-community/gitlab-org/ruby/gems/gitlab-glfm-markdown).
|
|
119
|
-
|
|
120
|
-
Please refer to [CONTRIBUTING](CONTRIBUTING.md) for more details.
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
../../Cargo.lock
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
[package]
|
|
2
|
-
name = "gitlab-glfm-markdown"
|
|
3
|
-
version = "0.0.41"
|
|
4
|
-
edition = "2021"
|
|
5
|
-
authors = ["digitalmoksha <bwalker@gitlab.com>", "Asherah Connor <aconnor@gitlab.com>"]
|
|
6
|
-
description = "GitLab Flavored Markdown parser and formatter. 100% CommonMark-compatible. Experimental."
|
|
7
|
-
publish = false
|
|
8
|
-
|
|
9
|
-
[lib]
|
|
10
|
-
crate-type = ["cdylib"]
|
|
11
|
-
|
|
12
|
-
[[bin]]
|
|
13
|
-
name = "gitlab-glfm-markdown"
|
|
14
|
-
required-features = ["cli"]
|
|
15
|
-
|
|
16
|
-
[dependencies]
|
|
17
|
-
clap = { version = "=4.4.18", optional = true, features = ["derive", "string"] }
|
|
18
|
-
comrak = { version = "0.49.0", default-features = false, features = ["shortcodes"] }
|
|
19
|
-
magnus = "0.8.2"
|
|
20
|
-
rb-sys = { version = "0.9.124", default-features = false, features = ["stable-api-compiled-fallback"] }
|
|
21
|
-
regex = "1.11.1"
|
|
22
|
-
lazy_static = "1.5.0"
|
|
23
|
-
serde_magnus = "0.10.0"
|
|
24
|
-
serde = { version = "1.0.219", features = ["serde_derive"] }
|
|
25
|
-
|
|
26
|
-
[features]
|
|
27
|
-
cli = ["clap", "comrak/syntect"]
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
require 'mkmf'
|
|
4
|
-
require 'rb_sys/mkmf'
|
|
5
|
-
|
|
6
|
-
create_rust_makefile('gitlab_glfm_markdown/gitlab_glfm_markdown') do |r|
|
|
7
|
-
r.auto_install_rust_toolchain = false
|
|
8
|
-
# Ensure all Rust dependencies are pinned when building
|
|
9
|
-
r.extra_cargo_args = ["--locked"]
|
|
10
|
-
end
|