govspeak 8.8.3 → 9.0.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/CHANGELOG.md +4 -0
- data/README.md +0 -12
- data/lib/govspeak/version.rb +1 -1
- data/lib/govspeak.rb +0 -4
- data/test/govspeak_test.rb +0 -29
- 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: 95a5244e69195ca6b70429063a23918bf1c11cf0c2269b9f90c46fa0f874b0d2
|
|
4
|
+
data.tar.gz: 12e5c4cfbd40a4a9d144bfdca2f0ca6c4fc10abe9d8de3f6e5868d98af8d7959
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e1222f5628b71f08eeb0453dae99891c8a42c8a446d6ad44b0087fa51991e48e93c22ed1bce50e2421c888f7d447af1e411171b607affb2e7dd17b855851c0dd
|
|
7
|
+
data.tar.gz: 2add7fce1c12861cdf6f0d78626f81bdafcedde870821f2adefd5a468125ce423e629c397b9747d944d3b853ca659d6f769a3b71a57da09fce99b5c1b63e7dbd
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
|
@@ -81,18 +81,6 @@ creates an example box
|
|
|
81
81
|
|
|
82
82
|
## Highlights
|
|
83
83
|
|
|
84
|
-
### Advisory (DEPRECATED: marked for removal. Use 'Information callouts' instead.)
|
|
85
|
-
|
|
86
|
-
@This is a very important message or warning@
|
|
87
|
-
|
|
88
|
-
highlights the enclosed text in yellow
|
|
89
|
-
|
|
90
|
-
```html
|
|
91
|
-
<h3 role="note" aria-label="Important" class="advisory">
|
|
92
|
-
<span>This is a very important message or warning</span>
|
|
93
|
-
</h3>
|
|
94
|
-
```
|
|
95
|
-
|
|
96
84
|
### Answer (DEPRECATED: marked for removal)
|
|
97
85
|
|
|
98
86
|
{::highlight-answer}
|
data/lib/govspeak/version.rb
CHANGED
data/lib/govspeak.rb
CHANGED
|
@@ -201,10 +201,6 @@ module Govspeak
|
|
|
201
201
|
#{Govspeak::Document.new(body.strip).to_html}</div>\n)
|
|
202
202
|
end
|
|
203
203
|
|
|
204
|
-
extension("important", surrounded_by("@")) do |body|
|
|
205
|
-
%(\n\n<div role="note" aria-label="Important" class="advisory">#{insert_strong_inside_p(body)}</div>\n)
|
|
206
|
-
end
|
|
207
|
-
|
|
208
204
|
extension("helpful", surrounded_by("%")) do |body|
|
|
209
205
|
%(\n\n<div role="note" aria-label="Warning" class="application-notice help-notice">\n#{Govspeak::Document.new(body.strip).to_html}</div>\n)
|
|
210
206
|
end
|
data/test/govspeak_test.rb
CHANGED
|
@@ -209,27 +209,6 @@ Teston
|
|
|
209
209
|
assert_text_output "I am very informational"
|
|
210
210
|
end
|
|
211
211
|
|
|
212
|
-
test_given_govspeak "@ I am very important @" do
|
|
213
|
-
assert_html_output %(
|
|
214
|
-
<div role="note" aria-label="Important" class="advisory">
|
|
215
|
-
<p><strong>I am very important</strong></p>
|
|
216
|
-
</div>)
|
|
217
|
-
assert_text_output "I am very important"
|
|
218
|
-
end
|
|
219
|
-
|
|
220
|
-
test_given_govspeak "
|
|
221
|
-
The following is very important
|
|
222
|
-
@ I am very important @
|
|
223
|
-
" do
|
|
224
|
-
assert_html_output %(
|
|
225
|
-
<p>The following is very important</p>
|
|
226
|
-
|
|
227
|
-
<div role="note" aria-label="Important" class="advisory">
|
|
228
|
-
<p><strong>I am very important</strong></p>
|
|
229
|
-
</div>)
|
|
230
|
-
assert_text_output "The following is very important I am very important"
|
|
231
|
-
end
|
|
232
|
-
|
|
233
212
|
test_given_govspeak "% I am very helpful %" do
|
|
234
213
|
assert_html_output %(
|
|
235
214
|
<div role="note" aria-label="Warning" class="application-notice help-notice">
|
|
@@ -1527,14 +1506,6 @@ Teston
|
|
|
1527
1506
|
'
|
|
1528
1507
|
end
|
|
1529
1508
|
|
|
1530
|
-
test_given_govspeak "@ Message with [a link](http://foo.bar/)@" do
|
|
1531
|
-
assert_html_output %(
|
|
1532
|
-
<div role="note" aria-label="Important" class="advisory">
|
|
1533
|
-
<p><strong>Message with <a rel="external" href="http://foo.bar/">a link</a></strong></p>
|
|
1534
|
-
</div>
|
|
1535
|
-
)
|
|
1536
|
-
end
|
|
1537
|
-
|
|
1538
1509
|
test "sanitize source input by default" do
|
|
1539
1510
|
document = Govspeak::Document.new("<script>doBadThings();</script>")
|
|
1540
1511
|
assert_equal "", document.to_html.strip
|
metadata
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: govspeak
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version:
|
|
4
|
+
version: 9.0.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- GOV.UK Dev
|
|
8
8
|
bindir: bin
|
|
9
9
|
cert_chain: []
|
|
10
|
-
date: 2025-01-
|
|
10
|
+
date: 2025-01-08 00:00:00.000000000 Z
|
|
11
11
|
dependencies:
|
|
12
12
|
- !ruby/object:Gem::Dependency
|
|
13
13
|
name: actionview
|