markly 0.3.0 → 0.4.0
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/ext/markly/markly.c +6 -4
- data/lib/markly/markly.bundle +0 -0
- data/lib/markly/renderer/html_renderer.rb +3 -1
- data/lib/markly/version.rb +1 -1
- metadata +3 -3
- data/lib/markly/markly.so +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 770b81ed57426a591eaa4335ad913df94f61017e08f5e19872766e59ec3d33db
|
4
|
+
data.tar.gz: 45f5295c1fae1747c841a85b8f17f1442d47ad91194a38874e1313e8c95313f4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 75bdb5b83d6ca7685fb659d27f45bfaaefe1241f306ec21281bbbd5906612663c8e4ba7ad3abf59069ff6501c72933c6770d09176dd119de946e5baea0b826ff
|
7
|
+
data.tar.gz: 0c0aa153efcbbb7914a805e52bf80fdda4bdc5d1ddb0352f7bb00c334f2730d8cd342a19fa273082c07597c16166c666b8f86be66a197729f902e0539903af8f
|
data/ext/markly/markly.c
CHANGED
@@ -47,6 +47,8 @@ static void rb_Markly_Node_free(void *data) {
|
|
47
47
|
|
48
48
|
if (cmark_node_parent(node) == NULL) {
|
49
49
|
cmark_node_free(node);
|
50
|
+
} else {
|
51
|
+
cmark_node_set_user_data(node, NULL);
|
50
52
|
}
|
51
53
|
}
|
52
54
|
}
|
@@ -329,10 +331,10 @@ static VALUE rb_node_set_string_content(VALUE self, VALUE s) {
|
|
329
331
|
* Returns a {Symbol} representing the node's type.
|
330
332
|
*/
|
331
333
|
static VALUE rb_node_get_type(VALUE self) {
|
332
|
-
int node_type;
|
333
|
-
cmark_node *node;
|
334
|
-
VALUE symbol;
|
335
|
-
const char *s;
|
334
|
+
int node_type = 0;
|
335
|
+
cmark_node *node = NULL;
|
336
|
+
VALUE symbol = NULL;
|
337
|
+
const char *s = NULL;
|
336
338
|
|
337
339
|
TypedData_Get_Struct(self, cmark_node, &rb_Markly_Node_Type, node);
|
338
340
|
|
Binary file
|
@@ -1,5 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require 'cgi'
|
4
|
+
|
3
5
|
module Markly
|
4
6
|
class HTMLRenderer < Renderer
|
5
7
|
def initialize(ids: false, **options)
|
@@ -17,7 +19,7 @@ module Markly
|
|
17
19
|
if @ids
|
18
20
|
id = node.to_plaintext.chomp.downcase.gsub(/\s+/, '-')
|
19
21
|
|
20
|
-
return " id=\"#{id}\""
|
22
|
+
return " id=\"#{CGI.escape_html id}\""
|
21
23
|
end
|
22
24
|
end
|
23
25
|
|
data/lib/markly/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: markly
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Garen Torikian
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2020-
|
13
|
+
date: 2020-07-13 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: bake
|
@@ -150,7 +150,7 @@ files:
|
|
150
150
|
- ext/markly/xml.c
|
151
151
|
- lib/markly.rb
|
152
152
|
- lib/markly/flags.rb
|
153
|
-
- lib/markly/markly.
|
153
|
+
- lib/markly/markly.bundle
|
154
154
|
- lib/markly/node.rb
|
155
155
|
- lib/markly/node/inspect.rb
|
156
156
|
- lib/markly/renderer.rb
|
data/lib/markly/markly.so
DELETED
Binary file
|