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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c7a3cd3c29adc90771a7c4c58f169dcbfbb1ce6b
4
- data.tar.gz: 5d32f832b00bff5b36f999328e4c08f1452c5bf1
3
+ metadata.gz: 6a388fc4615d46df235e0536567b730b5696f6be
4
+ data.tar.gz: 3f3933a0d6b4d5ba04c1addc9bd112e618c2b970
5
5
  SHA512:
6
- metadata.gz: 213b2c7f59852b1b266eeaf42f83c0b9ebe1ff460777a807bcb76b7f4c43cc4f0a4a422e721e2ea2e2386ae29104485b02d8d2cbda0d759a26b89ffc1b4c9f36
7
- data.tar.gz: 31f1bc71589921b7d402942cc48f623848de47d9e897c4283fb86b1e33e95cd9ea5f51370b5e14b7dc8fef067df0958b34fd368d8439cccc616faadfe9ae0609
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) | 12)
5
- #define CMARK_VERSION_STRING "0.28.3.gfm.12"
6
- #define CMARK_GFM_VERSION 12
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);
@@ -1,3 +1,4 @@
1
1
  module CommonMarker
2
- VERSION = '0.17.10'.freeze
2
+ VERSION = '0.17.11'.freeze
3
3
  end
4
+
@@ -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.10
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-08 00:00:00.000000000 Z
12
+ date: 2018-08-10 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: ruby-enum