commonmarker 0.23.10 → 0.23.11
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ext/commonmarker/commonmarker.c +8 -9
- data/lib/commonmarker/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e070ea3105d17c7c6aea2bed32918bf8f31eaf7fb70106e7c025bbce1c600bf9
|
4
|
+
data.tar.gz: f15ac1f428763032f711a799823ad865bdae33e7c1c671876201d690090170bb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 96a4195b535ebcff926773f0ea0b2b9b06b49cbf2b250e84ded16df5001805278482e22a89f30a2ede940453ca4a31b32eb9dbc7c315153bcdb40ae8c8294a3e
|
7
|
+
data.tar.gz: d9d781435db9096282da3a75dc8dca6eccc69ac3f23e37f23e0fc8f1f9eb1403f381d78db0bb5f24810222730a7968f041f3df0ed5027fe7251278f44747e840
|
@@ -45,11 +45,10 @@ static VALUE encode_utf8_string(const char *c_string) {
|
|
45
45
|
return string;
|
46
46
|
}
|
47
47
|
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
return string;
|
48
|
+
static VALUE commonmarker_cstr_adopt(const char *str, rb_encoding *enc) {
|
49
|
+
VALUE ret = rb_enc_str_new_cstr(str, enc);
|
50
|
+
cmark_get_default_mem_allocator()->free(str);
|
51
|
+
return ret;
|
53
52
|
}
|
54
53
|
|
55
54
|
static void rb_mark_c_struct(void *data) {
|
@@ -175,7 +174,7 @@ static VALUE rb_markdown_to_html(VALUE self, VALUE rb_text, VALUE rb_options, VA
|
|
175
174
|
cmark_parser_free(parser);
|
176
175
|
cmark_node_free(doc);
|
177
176
|
|
178
|
-
return
|
177
|
+
return commonmarker_cstr_adopt(html, rb_utf8_encoding());
|
179
178
|
}
|
180
179
|
|
181
180
|
/*
|
@@ -204,7 +203,7 @@ static VALUE rb_markdown_to_xml(VALUE self, VALUE rb_text, VALUE rb_options, VAL
|
|
204
203
|
cmark_parser_free(parser);
|
205
204
|
cmark_node_free(doc);
|
206
205
|
|
207
|
-
return
|
206
|
+
return commonmarker_cstr_adopt(xml, rb_utf8_encoding());
|
208
207
|
}
|
209
208
|
|
210
209
|
/*
|
@@ -1178,7 +1177,7 @@ static VALUE rb_html_escape_href(VALUE self, VALUE rb_text) {
|
|
1178
1177
|
if (houdini_escape_href(&buf, (const uint8_t *)RSTRING_PTR(rb_text),
|
1179
1178
|
RSTRING_LEN(rb_text))) {
|
1180
1179
|
result = (char *)cmark_strbuf_detach(&buf);
|
1181
|
-
return
|
1180
|
+
return commonmarker_cstr_adopt(result, rb_enc_get(rb_text));
|
1182
1181
|
|
1183
1182
|
}
|
1184
1183
|
|
@@ -1199,7 +1198,7 @@ static VALUE rb_html_escape_html(VALUE self, VALUE rb_text) {
|
|
1199
1198
|
if (houdini_escape_html0(&buf, (const uint8_t *)RSTRING_PTR(rb_text),
|
1200
1199
|
RSTRING_LEN(rb_text), 0)) {
|
1201
1200
|
result = (char *)cmark_strbuf_detach(&buf);
|
1202
|
-
return
|
1201
|
+
return commonmarker_cstr_adopt(result, rb_enc_get(rb_text));
|
1203
1202
|
}
|
1204
1203
|
|
1205
1204
|
return rb_text;
|
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: 0.23.
|
4
|
+
version: 0.23.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:
|
12
|
+
date: 2024-11-20 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: awesome_print
|
@@ -255,7 +255,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
255
255
|
- !ruby/object:Gem::Version
|
256
256
|
version: '0'
|
257
257
|
requirements: []
|
258
|
-
rubygems_version: 3.3.
|
258
|
+
rubygems_version: 3.3.27
|
259
259
|
signing_key:
|
260
260
|
specification_version: 4
|
261
261
|
summary: CommonMark parser and renderer. Written in C, wrapped in Ruby.
|