greenmat 3.5.1.0 → 3.5.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/ext/greenmat/html_blocks.h +70 -68
- data/lib/greenmat/version.rb +1 -1
- data/test/html5_test.rb +15 -6
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5ebea41bf33e060dc7d4a5c28fbac9e49759062ac85dcbea55b14b1485cd18f1
|
4
|
+
data.tar.gz: 18cf03b8c7b166736b13326d3e601384b3776d6a65384f46dbf7d7d9545a5528
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7e2eb93fbef73b7bb5853db8e107910bf3e7b8e89a649496040cdf665a9b97f54fd0031e0f042c1f6622764e51a85d87bada46d60b0ccbcb352e7743134daab3
|
7
|
+
data.tar.gz: 6da0421b78cf1b71fd92c080b62aeec8dc74726b999d5d4afb9dc10e465e15b0db28fef67d1d0343940bea56717ec94e944d47a6dfabbe8269dfd0d100fbd746
|
data/CHANGELOG.md
CHANGED
data/ext/greenmat/html_blocks.h
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
/* C code produced by gperf version 3.0.
|
1
|
+
/* C code produced by gperf version 3.0.4 */
|
2
2
|
/* Command-line: gperf -N find_block_tag -H hash_block_tag -C -c -E --ignore-case html_block_names.txt */
|
3
|
-
/* See
|
3
|
+
/* See http://git.io/RN0ncw for the list of recognized elements */
|
4
4
|
/* Computed positions: -k'1-2' */
|
5
5
|
|
6
6
|
#if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \
|
@@ -30,7 +30,7 @@
|
|
30
30
|
error "gperf generated tables don't work with this execution character set. Please report a bug to <bug-gnu-gperf@gnu.org>."
|
31
31
|
#endif
|
32
32
|
|
33
|
-
/* maximum key range =
|
33
|
+
/* maximum key range = 67, duplicates = 0 */
|
34
34
|
|
35
35
|
#ifndef GPERF_DOWNCASE
|
36
36
|
#define GPERF_DOWNCASE 1
|
@@ -94,34 +94,34 @@ hash_block_tag (str, len)
|
|
94
94
|
{
|
95
95
|
static const unsigned char asso_values[] =
|
96
96
|
{
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
0,
|
105
|
-
0,
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
97
|
+
68, 68, 68, 68, 68, 68, 68, 68, 68, 68,
|
98
|
+
68, 68, 68, 68, 68, 68, 68, 68, 68, 68,
|
99
|
+
68, 68, 68, 68, 68, 68, 68, 68, 68, 68,
|
100
|
+
68, 68, 68, 68, 68, 68, 68, 68, 68, 68,
|
101
|
+
68, 68, 68, 68, 68, 68, 68, 68, 68, 68,
|
102
|
+
55, 50, 45, 40, 35, 30, 68, 68, 68, 68,
|
103
|
+
68, 68, 68, 68, 68, 15, 10, 15, 15, 15,
|
104
|
+
0, 20, 10, 10, 5, 68, 68, 0, 20, 25,
|
105
|
+
0, 68, 68, 0, 25, 0, 15, 68, 68, 68,
|
106
|
+
68, 68, 68, 68, 68, 68, 68, 15, 10, 15,
|
107
|
+
15, 15, 0, 20, 10, 10, 5, 68, 68, 0,
|
108
|
+
20, 25, 0, 68, 68, 0, 25, 0, 15, 68,
|
109
|
+
68, 68, 68, 68, 68, 68, 68, 68, 68, 68,
|
110
|
+
68, 68, 68, 68, 68, 68, 68, 68, 68, 68,
|
111
|
+
68, 68, 68, 68, 68, 68, 68, 68, 68, 68,
|
112
|
+
68, 68, 68, 68, 68, 68, 68, 68, 68, 68,
|
113
|
+
68, 68, 68, 68, 68, 68, 68, 68, 68, 68,
|
114
|
+
68, 68, 68, 68, 68, 68, 68, 68, 68, 68,
|
115
|
+
68, 68, 68, 68, 68, 68, 68, 68, 68, 68,
|
116
|
+
68, 68, 68, 68, 68, 68, 68, 68, 68, 68,
|
117
|
+
68, 68, 68, 68, 68, 68, 68, 68, 68, 68,
|
118
|
+
68, 68, 68, 68, 68, 68, 68, 68, 68, 68,
|
119
|
+
68, 68, 68, 68, 68, 68, 68, 68, 68, 68,
|
120
|
+
68, 68, 68, 68, 68, 68, 68, 68, 68, 68,
|
121
|
+
68, 68, 68, 68, 68, 68, 68, 68, 68, 68,
|
122
|
+
68, 68, 68, 68, 68, 68, 68
|
123
123
|
};
|
124
|
-
register
|
124
|
+
register int hval = len;
|
125
125
|
|
126
126
|
switch (hval)
|
127
127
|
{
|
@@ -135,6 +135,12 @@ hash_block_tag (str, len)
|
|
135
135
|
return hval;
|
136
136
|
}
|
137
137
|
|
138
|
+
#ifdef __GNUC__
|
139
|
+
__inline
|
140
|
+
#if defined __GNUC_STDC_INLINE__ || defined __GNUC_GNU_INLINE__
|
141
|
+
__attribute__ ((__gnu_inline__))
|
142
|
+
#endif
|
143
|
+
#endif
|
138
144
|
const char *
|
139
145
|
find_block_tag (str, len)
|
140
146
|
register const char *str;
|
@@ -142,80 +148,76 @@ find_block_tag (str, len)
|
|
142
148
|
{
|
143
149
|
enum
|
144
150
|
{
|
145
|
-
TOTAL_KEYWORDS =
|
151
|
+
TOTAL_KEYWORDS = 41,
|
146
152
|
MIN_WORD_LENGTH = 1,
|
147
153
|
MAX_WORD_LENGTH = 10,
|
148
154
|
MIN_HASH_VALUE = 1,
|
149
|
-
MAX_HASH_VALUE =
|
155
|
+
MAX_HASH_VALUE = 67
|
150
156
|
};
|
151
157
|
|
152
158
|
static const char * const wordlist[] =
|
153
159
|
{
|
154
160
|
"",
|
155
161
|
"p",
|
156
|
-
"
|
157
|
-
"
|
162
|
+
"ul",
|
163
|
+
"pre",
|
158
164
|
"form",
|
159
|
-
"",
|
165
|
+
"style",
|
160
166
|
"footer",
|
161
|
-
"
|
162
|
-
"
|
163
|
-
"", "",
|
167
|
+
"section",
|
168
|
+
"", "", "",
|
164
169
|
"figure",
|
165
|
-
"
|
170
|
+
"hr",
|
166
171
|
"fieldset",
|
167
|
-
"",
|
172
|
+
"math",
|
168
173
|
"figcaption",
|
169
174
|
"header",
|
170
|
-
"
|
171
|
-
"
|
172
|
-
"math",
|
173
|
-
"video",
|
174
|
-
"script",
|
175
|
-
"section",
|
176
|
-
"noscript",
|
175
|
+
"dl",
|
176
|
+
"del",
|
177
177
|
"",
|
178
178
|
"blockquote",
|
179
|
-
"
|
180
|
-
"
|
181
|
-
"
|
182
|
-
"",
|
183
|
-
"style",
|
184
|
-
"output",
|
185
|
-
"summary",
|
186
|
-
"nav",
|
179
|
+
"script",
|
180
|
+
"article",
|
181
|
+
"div",
|
187
182
|
"",
|
188
|
-
"
|
183
|
+
"video",
|
184
|
+
"hgroup",
|
185
|
+
"ol",
|
186
|
+
"noscript",
|
187
|
+
"", "",
|
189
188
|
"canvas",
|
190
189
|
"dd",
|
191
|
-
"
|
190
|
+
"nav",
|
192
191
|
"abbr",
|
193
|
-
"
|
192
|
+
"audio",
|
194
193
|
"iframe",
|
195
|
-
"
|
196
|
-
"",
|
197
|
-
"
|
194
|
+
"address",
|
195
|
+
"ins",
|
196
|
+
"",
|
197
|
+
"table",
|
198
198
|
"",
|
199
199
|
"h6",
|
200
200
|
"", "",
|
201
|
+
"aside",
|
202
|
+
"output",
|
203
|
+
"h5",
|
204
|
+
"", "",
|
201
205
|
"tfoot",
|
202
206
|
"",
|
203
|
-
"h5",
|
204
|
-
"", "", "", "",
|
205
207
|
"h4",
|
206
208
|
"", "", "", "",
|
207
|
-
"address",
|
208
|
-
"", "", "", "",
|
209
209
|
"h3",
|
210
210
|
"", "", "", "",
|
211
|
-
"h2"
|
211
|
+
"h2",
|
212
|
+
"", "", "", "",
|
213
|
+
"h1"
|
212
214
|
};
|
213
215
|
|
214
216
|
if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH)
|
215
217
|
{
|
216
|
-
|
218
|
+
register int key = hash_block_tag (str, len);
|
217
219
|
|
218
|
-
if (key <= MAX_HASH_VALUE)
|
220
|
+
if (key <= MAX_HASH_VALUE && key >= 0)
|
219
221
|
{
|
220
222
|
register const char *s = wordlist[key];
|
221
223
|
|
data/lib/greenmat/version.rb
CHANGED
data/test/html5_test.rb
CHANGED
@@ -68,15 +68,24 @@ class HTML5Test < Greenmat::TestCase
|
|
68
68
|
assert_renders html, html
|
69
69
|
end
|
70
70
|
|
71
|
-
def
|
71
|
+
def test_details_tags_ignoring
|
72
72
|
details = <<-HTML.chomp.strip_heredoc
|
73
|
-
<details>
|
74
|
-
log:
|
73
|
+
<details><summary>Folding sample</summary><div>
|
75
74
|
|
76
|
-
|
75
|
+
```rb
|
76
|
+
puts 'Hello, World'
|
77
|
+
```
|
78
|
+
</div></details>
|
77
79
|
HTML
|
80
|
+
html = <<-HTML.chomp.strip_heredoc
|
81
|
+
<p><details><summary>Folding sample</summary><div></p>
|
78
82
|
|
79
|
-
|
80
|
-
|
83
|
+
<p><code>rb
|
84
|
+
puts 'Hello, World'
|
85
|
+
</code>
|
86
|
+
</div></details></p>
|
87
|
+
HTML
|
81
88
|
|
89
|
+
assert_renders html, details
|
90
|
+
end
|
82
91
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: greenmat
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.5.1.
|
4
|
+
version: 3.5.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Natacha Porté
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2021-
|
12
|
+
date: 2021-03-03 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activesupport
|