commonmarker 2.8.3-aarch64-linux → 2.10.0-aarch64-linux
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/README.md +35 -15
- data/lib/commonmarker/3.2/commonmarker.so +0 -0
- data/lib/commonmarker/3.3/commonmarker.so +0 -0
- data/lib/commonmarker/3.4/commonmarker.so +0 -0
- data/lib/commonmarker/4.0/commonmarker.so +0 -0
- data/lib/commonmarker/config.rb +4 -2
- data/lib/commonmarker/node/inspect.rb +2 -4
- data/lib/commonmarker/node.rb +12 -0
- data/lib/commonmarker/version.rb +1 -1
- metadata +3 -31
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 38ea7af647353afe362c694fe7273fdc84d496dde26a3733aa226369117abe8c
|
|
4
|
+
data.tar.gz: b401d74ccf79a7d12f1345615fc0d75b1870d90735765295cf3e3f34d477afad
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 807260ae907bc45ad38362262286711a6c9b862ae6344f615e9b9430283de28bd85626a5f1ff4054cdce23bbb9041019a38f7be137fd92da4364a719ae06aa09
|
|
7
|
+
data.tar.gz: 4cdbcf2f660c69739e5e3624e4282a71b1fdc8676926f6565e5016634561734ba6e0253267bfca753cc30543ff39ecd26979e59865cb0c87a1801bed5119f0e6
|
data/README.md
CHANGED
|
@@ -140,6 +140,24 @@ doc.to_commonmark
|
|
|
140
140
|
# => # The site\n\nGitHub\n
|
|
141
141
|
```
|
|
142
142
|
|
|
143
|
+
### Reading and writing node content
|
|
144
|
+
|
|
145
|
+
`string_content` reads and writes the text of nodes whose content is plain text (like `:text`, `:code`, and `:code_block`).
|
|
146
|
+
|
|
147
|
+
`literal` reads and writes the raw string a node carries, for every node type that has one (like `:text`, `:code`, `:code_block`, `:html_block`, `:html_inline`, `:raw`, `:math`, and `:frontmatter`).
|
|
148
|
+
|
|
149
|
+
The two exist separately because they mean different things. Rewriting `string_content` only ever swaps text for text. Rewriting `literal` on an `:html_block`, `:html_inline`, or `:raw` node writes markup that is emitted unescaped:
|
|
150
|
+
|
|
151
|
+
```ruby
|
|
152
|
+
doc = Commonmarker.parse("A <b>bold</b> claim")
|
|
153
|
+
|
|
154
|
+
doc.walk do |node|
|
|
155
|
+
node.literal = "<i>" if node.type == :html_inline && node.literal == "<b>"
|
|
156
|
+
end
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
Note that a `:frontmatter` node's literal includes its delimiters and trailing newlines, so anything you assign must include them too.
|
|
160
|
+
|
|
143
161
|
## Options and plugins
|
|
144
162
|
|
|
145
163
|
### Options
|
|
@@ -169,21 +187,22 @@ Note that there is a distinction in comrak for "parse" options and "render" opti
|
|
|
169
187
|
|
|
170
188
|
### Render options
|
|
171
189
|
|
|
172
|
-
| Name | Description
|
|
173
|
-
| -------------------- |
|
|
174
|
-
| `hardbreaks` | [Soft line breaks](http://spec.commonmark.org/0.27/#soft-line-breaks) translate into hard line breaks.
|
|
175
|
-
| `github_pre_lang` | GitHub-style `<pre lang="xyz">` is used for fenced code blocks with info tags.
|
|
176
|
-
| `full_info_string` | Gives info string data after a space in a `data-meta` attribute on code blocks.
|
|
177
|
-
| `width` | The wrap column when outputting CommonMark.
|
|
178
|
-
| `unsafe` | Allow rendering of raw HTML and potentially dangerous links.
|
|
179
|
-
| `escape` | Escape raw HTML instead of clobbering it.
|
|
180
|
-
| `sourcepos` | Include source position attribute in HTML and XML output.
|
|
181
|
-
| `escaped_char_spans` | Wrap escaped characters in span tags.
|
|
182
|
-
| `ignore_empty_links` | Ignores empty links, leaving the Markdown text in place.
|
|
183
|
-
| `gfm_quirks` | Outputs HTML with GFM-style quirks; namely, not nesting `<strong>` inlines.
|
|
184
|
-
| `prefer_fenced` | Always output fenced code blocks, even where an indented one could be used.
|
|
185
|
-
| `tasklist_classes` | Add CSS classes to the HTML output of the tasklist extension
|
|
186
|
-
| `compact_html` | Suppress newlines in pretty-printed HTML output.
|
|
190
|
+
| Name | Description | Default |
|
|
191
|
+
| -------------------- | ------------------------------------------------------------------------------------------------------------------------ | ------------ |
|
|
192
|
+
| `hardbreaks` | [Soft line breaks](http://spec.commonmark.org/0.27/#soft-line-breaks) translate into hard line breaks. | `true` |
|
|
193
|
+
| `github_pre_lang` | GitHub-style `<pre lang="xyz">` is used for fenced code blocks with info tags. | `true` |
|
|
194
|
+
| `full_info_string` | Gives info string data after a space in a `data-meta` attribute on code blocks. | `false` |
|
|
195
|
+
| `width` | The wrap column when outputting CommonMark. | `80` |
|
|
196
|
+
| `unsafe` | Allow rendering of raw HTML and potentially dangerous links. | `false` |
|
|
197
|
+
| `escape` | Escape raw HTML instead of clobbering it. | `false` |
|
|
198
|
+
| `sourcepos` | Include source position attribute in HTML and XML output. | `false` |
|
|
199
|
+
| `escaped_char_spans` | Wrap escaped characters in span tags. | `true` |
|
|
200
|
+
| `ignore_empty_links` | Ignores empty links, leaving the Markdown text in place. | `false` |
|
|
201
|
+
| `gfm_quirks` | Outputs HTML with GFM-style quirks; namely, not nesting `<strong>` inlines. | `false` |
|
|
202
|
+
| `prefer_fenced` | Always output fenced code blocks, even where an indented one could be used. | `false` |
|
|
203
|
+
| `tasklist_classes` | Add CSS classes to the HTML output of the tasklist extension | `false` |
|
|
204
|
+
| `compact_html` | Suppress newlines in pretty-printed HTML output. | `false` |
|
|
205
|
+
| `alert_style` | The style of alert output: `"specific"` (`<div class="markdown-alert">`) or `"semantic"` (`<aside class="admonition">`). | `"specific"` |
|
|
187
206
|
|
|
188
207
|
As well, there are several extensions which you can toggle in the same manner:
|
|
189
208
|
|
|
@@ -212,6 +231,7 @@ Commonmarker.to_html('"Hi *there*"', options: {
|
|
|
212
231
|
| `front_matter_delimiter` | Enables the front matter extension. | `""` |
|
|
213
232
|
| `multiline_block_quotes` | Enables the multiline block quotes extension. | `false` |
|
|
214
233
|
| `math_dollars`, `math_code` | Enables the math extension. | `false` |
|
|
234
|
+
| `math_latex` | Enables the math extension with LaTeX-style delimiters (`\(inline\)`, `\[display\]`). | `false` |
|
|
215
235
|
| `shortcodes` | Enables the shortcodes extension. | `true` |
|
|
216
236
|
| `wikilinks_title_before_pipe` | Enables the wikilinks extension, placing the title before the dividing pipe. | `false` |
|
|
217
237
|
| `wikilinks_title_after_pipe` | Enables the wikilinks extension, placing the title after the dividing pipe. | `false` |
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
data/lib/commonmarker/config.rb
CHANGED
|
@@ -28,6 +28,7 @@ module Commonmarker
|
|
|
28
28
|
prefer_fenced: false,
|
|
29
29
|
tasklist_classes: false,
|
|
30
30
|
compact_html: false,
|
|
31
|
+
alert_style: "specific",
|
|
31
32
|
}.freeze,
|
|
32
33
|
extension: {
|
|
33
34
|
strikethrough: true,
|
|
@@ -45,6 +46,7 @@ module Commonmarker
|
|
|
45
46
|
multiline_block_quotes: false,
|
|
46
47
|
math_dollars: false,
|
|
47
48
|
math_code: false,
|
|
49
|
+
math_latex: false,
|
|
48
50
|
shortcodes: true,
|
|
49
51
|
wikilinks_title_before_pipe: false,
|
|
50
52
|
wikilinks_title_after_pipe: false,
|
|
@@ -66,8 +68,8 @@ module Commonmarker
|
|
|
66
68
|
syntax_highlighter: {
|
|
67
69
|
theme: "base16-ocean.dark",
|
|
68
70
|
path: "",
|
|
69
|
-
},
|
|
70
|
-
}
|
|
71
|
+
}.freeze,
|
|
72
|
+
}.freeze
|
|
71
73
|
|
|
72
74
|
class << self
|
|
73
75
|
include Commonmarker::Utils
|
|
@@ -28,10 +28,8 @@ module Commonmarker
|
|
|
28
28
|
:fence_info,
|
|
29
29
|
:alert_type,
|
|
30
30
|
].filter_map do |name|
|
|
31
|
-
[name, __send__(name)]
|
|
32
|
-
|
|
33
|
-
nil
|
|
34
|
-
end.compact
|
|
31
|
+
[name, __send__(name)] if respond_to?(name)
|
|
32
|
+
end
|
|
35
33
|
|
|
36
34
|
printer.seplist(attrs) do |name, value|
|
|
37
35
|
printer.text("#{name}=")
|
data/lib/commonmarker/node.rb
CHANGED
|
@@ -8,6 +8,18 @@ module Commonmarker
|
|
|
8
8
|
include Enumerable
|
|
9
9
|
include Inspect
|
|
10
10
|
|
|
11
|
+
# Public: Whether this node responds to the given method.
|
|
12
|
+
#
|
|
13
|
+
# name - A {Symbol} or {String} naming the method.
|
|
14
|
+
# include_all - A {Boolean} indicating whether to consider private methods.
|
|
15
|
+
#
|
|
16
|
+
# Returns a {Boolean}.
|
|
17
|
+
def respond_to?(name, include_all = false)
|
|
18
|
+
return false if node_supports?(name.to_sym) == false
|
|
19
|
+
|
|
20
|
+
super
|
|
21
|
+
end
|
|
22
|
+
|
|
11
23
|
# Public: An iterator that "walks the tree," descending into children recursively.
|
|
12
24
|
#
|
|
13
25
|
# blk - A {Proc} representing the action to take for each child
|
data/lib/commonmarker/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: commonmarker
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.
|
|
4
|
+
version: 2.10.0
|
|
5
5
|
platform: aarch64-linux
|
|
6
6
|
authors:
|
|
7
7
|
- Garen Torikian
|
|
@@ -9,36 +9,8 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: exe
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date: 2026-
|
|
13
|
-
dependencies:
|
|
14
|
-
- !ruby/object:Gem::Dependency
|
|
15
|
-
name: rake
|
|
16
|
-
requirement: !ruby/object:Gem::Requirement
|
|
17
|
-
requirements:
|
|
18
|
-
- - "~>"
|
|
19
|
-
- !ruby/object:Gem::Version
|
|
20
|
-
version: '13.0'
|
|
21
|
-
type: :development
|
|
22
|
-
prerelease: false
|
|
23
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
24
|
-
requirements:
|
|
25
|
-
- - "~>"
|
|
26
|
-
- !ruby/object:Gem::Version
|
|
27
|
-
version: '13.0'
|
|
28
|
-
- !ruby/object:Gem::Dependency
|
|
29
|
-
name: rake-compiler
|
|
30
|
-
requirement: !ruby/object:Gem::Requirement
|
|
31
|
-
requirements:
|
|
32
|
-
- - "~>"
|
|
33
|
-
- !ruby/object:Gem::Version
|
|
34
|
-
version: '1.2'
|
|
35
|
-
type: :development
|
|
36
|
-
prerelease: false
|
|
37
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
38
|
-
requirements:
|
|
39
|
-
- - "~>"
|
|
40
|
-
- !ruby/object:Gem::Version
|
|
41
|
-
version: '1.2'
|
|
12
|
+
date: 2026-08-24 00:00:00.000000000 Z
|
|
13
|
+
dependencies: []
|
|
42
14
|
description: A fast, safe, extensible parser for CommonMark. This wraps the comrak
|
|
43
15
|
Rust crate.
|
|
44
16
|
email:
|