greenmat 3.5.1.0 → 3.5.1.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f39bc77cb9919af4e018b008bbc6d1cd8347d7bee919592dbe96d09b8eeab19f
4
- data.tar.gz: c3f07e638dddaa7bd603d0d044a6c847abd425c65aa2106701d1e8ccf4b547ce
3
+ metadata.gz: 5ebea41bf33e060dc7d4a5c28fbac9e49759062ac85dcbea55b14b1485cd18f1
4
+ data.tar.gz: 18cf03b8c7b166736b13326d3e601384b3776d6a65384f46dbf7d7d9545a5528
5
5
  SHA512:
6
- metadata.gz: '02870d7ebb28e12b26c38b80363be12db1961fcb0c1e2f2a99d0e95eded8f5c203c8750e95afa2300e08784c17ae3ccc5f73d19ff1ef8c3133cb98bf0eae1f22'
7
- data.tar.gz: 722bb67d5443e75f266881a60a2dd090c4417dd44f1049ebaaf4185c9e4fa5d72232182794ce648a31cb3a33b0315e2ec7b6c4458428567b4c1a9449c6bfabc9
6
+ metadata.gz: 7e2eb93fbef73b7bb5853db8e107910bf3e7b8e89a649496040cdf665a9b97f54fd0031e0f042c1f6622764e51a85d87bada46d60b0ccbcb352e7743134daab3
7
+ data.tar.gz: 6da0421b78cf1b71fd92c080b62aeec8dc74726b999d5d4afb9dc10e465e15b0db28fef67d1d0343940bea56717ec94e944d47a6dfabbe8269dfd0d100fbd746
data/CHANGELOG.md CHANGED
@@ -2,6 +2,10 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ ## v3.5.1.1
6
+
7
+ * Unsupport details and summary tags.
8
+
5
9
  ## v3.5.1.0
6
10
 
7
11
  * Update base Redcarpet version to 3.5.1.
@@ -1,6 +1,6 @@
1
- /* C code produced by gperf version 3.0.3 */
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 https://git.io/vPLqa for the list of recognized elements */
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 = 72, duplicates = 0 */
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
- 73, 73, 73, 73, 73, 73, 73, 73, 73, 73,
98
- 73, 73, 73, 73, 73, 73, 73, 73, 73, 73,
99
- 73, 73, 73, 73, 73, 73, 73, 73, 73, 73,
100
- 73, 73, 73, 73, 73, 73, 73, 73, 73, 73,
101
- 73, 73, 73, 73, 73, 73, 73, 73, 73, 73,
102
- 26, 60, 55, 45, 40, 35, 73, 73, 73, 73,
103
- 73, 73, 73, 73, 73, 20, 15, 15, 0, 35,
104
- 0, 25, 10, 10, 5, 73, 73, 0, 15, 15,
105
- 0, 73, 73, 15, 20, 10, 10, 73, 73, 73,
106
- 73, 73, 73, 73, 73, 73, 73, 20, 15, 15,
107
- 0, 35, 0, 25, 10, 10, 5, 73, 73, 0,
108
- 15, 15, 0, 73, 73, 15, 20, 10, 10, 73,
109
- 73, 73, 73, 73, 73, 73, 73, 73, 73, 73,
110
- 73, 73, 73, 73, 73, 73, 73, 73, 73, 73,
111
- 73, 73, 73, 73, 73, 73, 73, 73, 73, 73,
112
- 73, 73, 73, 73, 73, 73, 73, 73, 73, 73,
113
- 73, 73, 73, 73, 73, 73, 73, 73, 73, 73,
114
- 73, 73, 73, 73, 73, 73, 73, 73, 73, 73,
115
- 73, 73, 73, 73, 73, 73, 73, 73, 73, 73,
116
- 73, 73, 73, 73, 73, 73, 73, 73, 73, 73,
117
- 73, 73, 73, 73, 73, 73, 73, 73, 73, 73,
118
- 73, 73, 73, 73, 73, 73, 73, 73, 73, 73,
119
- 73, 73, 73, 73, 73, 73, 73, 73, 73, 73,
120
- 73, 73, 73, 73, 73, 73, 73, 73, 73, 73,
121
- 73, 73, 73, 73, 73, 73, 73, 73, 73, 73,
122
- 73, 73, 73, 73, 73, 73, 73
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 unsigned int hval = len;
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 = 43,
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 = 72
155
+ MAX_HASH_VALUE = 67
150
156
  };
151
157
 
152
158
  static const char * const wordlist[] =
153
159
  {
154
160
  "",
155
161
  "p",
156
- "dl",
157
- "del",
162
+ "ul",
163
+ "pre",
158
164
  "form",
159
- "",
165
+ "style",
160
166
  "footer",
161
- "details",
162
- "div",
163
- "", "",
167
+ "section",
168
+ "", "", "",
164
169
  "figure",
165
- "ul",
170
+ "hr",
166
171
  "fieldset",
167
- "",
172
+ "math",
168
173
  "figcaption",
169
174
  "header",
170
- "ol",
171
- "pre",
172
- "math",
173
- "video",
174
- "script",
175
- "section",
176
- "noscript",
175
+ "dl",
176
+ "del",
177
177
  "",
178
178
  "blockquote",
179
- "hgroup",
180
- "hr",
181
- "ins",
182
- "",
183
- "style",
184
- "output",
185
- "summary",
186
- "nav",
179
+ "script",
180
+ "article",
181
+ "div",
187
182
  "",
188
- "audio",
183
+ "video",
184
+ "hgroup",
185
+ "ol",
186
+ "noscript",
187
+ "", "",
189
188
  "canvas",
190
189
  "dd",
191
- "h1",
190
+ "nav",
192
191
  "abbr",
193
- "table",
192
+ "audio",
194
193
  "iframe",
195
- "article",
196
- "", "",
197
- "aside",
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
- unsigned int key = hash_block_tag (str, len);
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
 
@@ -1,3 +1,3 @@
1
1
  module Greenmat
2
- VERSION = '3.5.1.0'
2
+ VERSION = '3.5.1.1'
3
3
  end
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 test_new_html5_tags_not_escaped
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
- </details>
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
- assert_renders details, details
80
- end
83
+ <p><code>rb
84
+ puts &#39;Hello, World&#39;
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.0
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-02-16 00:00:00.000000000 Z
12
+ date: 2021-03-03 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport