commonmarker 0.17.10 → 0.17.11
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/ext/commonmarker/cmark_version.h +3 -3
- data/ext/commonmarker/strikethrough.c +7 -0
- data/lib/commonmarker/version.rb +2 -1
- data/test/test_extensions.rb +16 -0
- 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: 6a388fc4615d46df235e0536567b730b5696f6be
|
4
|
+
data.tar.gz: 3f3933a0d6b4d5ba04c1addc9bd112e618c2b970
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d183bae283bc551704d5244a0483895817ac4ab0339cdf8a97838ab52afe8dc9e4f01b556f70b0de9738b2c35606f735d2972baa3093f3b6e226b0b18ab1daf0
|
7
|
+
data.tar.gz: f1b2ce96fed16ef6de201eb23e7a832fdbf7ca941d9158727747c9fb63211e206659bcd05752ebb0121a67d836a43f629107d9a5eef52f17bd924de1b38e4eb9
|
@@ -1,8 +1,8 @@
|
|
1
1
|
#ifndef CMARK_VERSION_H
|
2
2
|
#define CMARK_VERSION_H
|
3
3
|
|
4
|
-
#define CMARK_VERSION ((0 << 24) | (28 << 16) | (3 << 8) |
|
5
|
-
#define CMARK_VERSION_STRING "0.28.3.gfm.
|
6
|
-
#define CMARK_GFM_VERSION
|
4
|
+
#define CMARK_VERSION ((0 << 24) | (28 << 16) | (3 << 8) | 14)
|
5
|
+
#define CMARK_VERSION_STRING "0.28.3.gfm.14"
|
6
|
+
#define CMARK_GFM_VERSION 14
|
7
7
|
|
8
8
|
#endif
|
@@ -133,6 +133,12 @@ static void html_render(cmark_syntax_extension *extension,
|
|
133
133
|
}
|
134
134
|
}
|
135
135
|
|
136
|
+
static void plaintext_render(cmark_syntax_extension *extension,
|
137
|
+
cmark_renderer *renderer, cmark_node *node,
|
138
|
+
cmark_event_type ev_type, int options) {
|
139
|
+
renderer->out(renderer, node, "~", false, LITERAL);
|
140
|
+
}
|
141
|
+
|
136
142
|
cmark_syntax_extension *create_strikethrough_extension(void) {
|
137
143
|
cmark_syntax_extension *ext = cmark_syntax_extension_new("strikethrough");
|
138
144
|
cmark_llist *special_chars = NULL;
|
@@ -143,6 +149,7 @@ cmark_syntax_extension *create_strikethrough_extension(void) {
|
|
143
149
|
cmark_syntax_extension_set_latex_render_func(ext, latex_render);
|
144
150
|
cmark_syntax_extension_set_man_render_func(ext, man_render);
|
145
151
|
cmark_syntax_extension_set_html_render_func(ext, html_render);
|
152
|
+
cmark_syntax_extension_set_plaintext_render_func(ext, plaintext_render);
|
146
153
|
CMARK_NODE_STRIKETHROUGH = cmark_syntax_extension_add_node(1);
|
147
154
|
|
148
155
|
cmark_syntax_extension_set_match_inline_func(ext, match);
|
data/lib/commonmarker/version.rb
CHANGED
data/test/test_extensions.rb
CHANGED
@@ -102,4 +102,20 @@ aaa | bbb | ccc | ddd | eee
|
|
102
102
|
fff | ggg | hhh | iii | jjj
|
103
103
|
MD
|
104
104
|
end
|
105
|
+
|
106
|
+
def test_plaintext
|
107
|
+
assert_equal(<<-HTML, CommonMarker.render_doc(<<-MD, :DEFAULT, %i[table strikethrough]).to_plaintext)
|
108
|
+
Hello ~there~.
|
109
|
+
|
110
|
+
| a |
|
111
|
+
| --- |
|
112
|
+
| b |
|
113
|
+
HTML
|
114
|
+
Hello ~~there~~.
|
115
|
+
|
116
|
+
| a |
|
117
|
+
| - |
|
118
|
+
| b |
|
119
|
+
MD
|
120
|
+
end
|
105
121
|
end
|
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.11
|
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-08-
|
12
|
+
date: 2018-08-10 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: ruby-enum
|