commonmarker 0.17.8 → 0.17.9
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of commonmarker might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/README.md +10 -9
- data/ext/commonmarker/html.c +2 -2
- data/lib/commonmarker/renderer/html_renderer.rb +1 -1
- data/lib/commonmarker/version.rb +1 -1
- data/test/test_footnotes.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dee026bae0a558ffc50c4905a4899e370796906f
|
4
|
+
data.tar.gz: 30c00d2b0f855ed6e670bbe0bb478c4667d3aa5f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 465d767915f0e45323d004e3b4c35e37a3bd7e584070b55228d54d14168e59e104e19021ae65091b7336af291fc9c4ad2d949c52b0e61171396ecd8aa08dcab7
|
7
|
+
data.tar.gz: 3e4d0f54eca9b0a146de6587cdf501d71dd2a5d992f7b826e811c68cf9195b32ffbc9dc4663ba8b1078d09c8396200a44fafffa45dd3d8be7394ab1a238151b3
|
data/README.md
CHANGED
@@ -129,24 +129,25 @@ CommonMarker accepts the same options that CMark does, as symbols. Note that the
|
|
129
129
|
|
130
130
|
### Parse options
|
131
131
|
|
132
|
-
| Name
|
133
|
-
|
|
134
|
-
| `:DEFAULT`
|
135
|
-
| `:
|
136
|
-
| `:
|
137
|
-
| `:
|
138
|
-
| `:
|
132
|
+
| Name | Description
|
133
|
+
| ----------------------------- | -----------
|
134
|
+
| `:DEFAULT` | The default parsing system.
|
135
|
+
| `:FOOTNOTES` | Parse footnotes.
|
136
|
+
| `:LIBERAL_HTML_TAG` | Support liberal parsing of inline HTML tags.
|
137
|
+
| `:SMART` | Use smart punctuation (curly quotes, etc.).
|
138
|
+
| `:STRIKETHROUGH_DOUBLE_TILDE` | Parse strikethroughs by double tildes (compatibility with [redcarpet](https://github.com/vmg/redcarpet))
|
139
|
+
| `:VALIDATE_UTF8` | Replace illegal sequences with the replacement character `U+FFFD`.
|
139
140
|
|
140
141
|
### Render options
|
141
142
|
|
142
143
|
| Name | Description
|
143
144
|
| ------------------ | -----------
|
144
145
|
| `:DEFAULT` | The default rendering system.
|
145
|
-
| `:
|
146
|
+
| `:GITHUB_PRE_LANG` | Use GitHub-style `<pre lang>` for fenced code blocks.
|
146
147
|
| `:HARDBREAKS` | Treat `\n` as hardbreaks (by adding `<br/>`).
|
147
148
|
| `:NOBREAKS` | Translate `\n` in the source to a single whitespace.
|
148
149
|
| `:SAFE` | Suppress raw HTML and unsafe links.
|
149
|
-
| `:
|
150
|
+
| `:SOURCEPOS` | Include source position in rendered HTML.
|
150
151
|
| `:TABLE_PREFER_STYLE_ATTRIBUTES` | Use `style` insted of `align` for table cells
|
151
152
|
|
152
153
|
### Passing options
|
data/ext/commonmarker/html.c
CHANGED
@@ -406,9 +406,9 @@ static int S_render_node(cmark_html_renderer *renderer, cmark_node *node,
|
|
406
406
|
cmark_strbuf_put(html, node->as.literal.data, node->as.literal.len);
|
407
407
|
cmark_strbuf_puts(html, "\" id=\"fnref");
|
408
408
|
cmark_strbuf_put(html, node->as.literal.data, node->as.literal.len);
|
409
|
-
cmark_strbuf_puts(html, "\">
|
409
|
+
cmark_strbuf_puts(html, "\">");
|
410
410
|
cmark_strbuf_put(html, node->as.literal.data, node->as.literal.len);
|
411
|
-
cmark_strbuf_puts(html, "
|
411
|
+
cmark_strbuf_puts(html, "</a></sup>");
|
412
412
|
}
|
413
413
|
break;
|
414
414
|
|
@@ -211,7 +211,7 @@ module CommonMarker
|
|
211
211
|
end
|
212
212
|
|
213
213
|
def footnote_reference(node)
|
214
|
-
out("<sup class=\"footnote-ref\"><a href=\"#fn#{node.string_content}\" id=\"fnref#{node.string_content}\"
|
214
|
+
out("<sup class=\"footnote-ref\"><a href=\"#fn#{node.string_content}\" id=\"fnref#{node.string_content}\">#{node.string_content}</a></sup>")
|
215
215
|
end
|
216
216
|
|
217
217
|
def footnote_definition(_)
|
data/lib/commonmarker/version.rb
CHANGED
data/test/test_footnotes.rb
CHANGED
@@ -4,7 +4,7 @@ class TestFootnotes < Minitest::Test
|
|
4
4
|
def setup
|
5
5
|
@doc = CommonMarker.render_doc("Hello[^hi].\n\n[^hi]: Hey!\n", :FOOTNOTES)
|
6
6
|
@expected = <<-HTML
|
7
|
-
<p>Hello<sup class="footnote-ref"><a href="#fn1" id="fnref1">
|
7
|
+
<p>Hello<sup class="footnote-ref"><a href="#fn1" id="fnref1">1</a></sup>.</p>
|
8
8
|
<section class="footnotes">
|
9
9
|
<ol>
|
10
10
|
<li id="fn1">
|
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: 0.17.
|
4
|
+
version: 0.17.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Garen Torikian
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2018-
|
12
|
+
date: 2018-03-12 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: ruby-enum
|