From af41809625d6f623d15a32ad757fdec9aa91afd9 Mon Sep 17 00:00:00 2001 From: Catalina Ilie Date: Tue, 29 Oct 2024 16:47:35 +0000 Subject: [PATCH] Remove Advisory component The advisory component has been earmarked for removal. It does not pull in styles from the design system and so has to be manually updated if it needs changing. 'Information callouts' will be used instead. --- README.md | 12 ------------ lib/govspeak.rb | 4 ---- test/govspeak_test.rb | 29 ----------------------------- 3 files changed, 45 deletions(-) diff --git a/README.md b/README.md index 7a7c088..2f2c8b3 100644 --- a/README.md +++ b/README.md @@ -81,18 +81,6 @@ creates an example box ## Highlights -### Advisory (DEPRECATED: marked for removal. Use 'Information callouts' instead.) - - @This is a very important message or warning@ - -highlights the enclosed text in yellow - -```html -

- This is a very important message or warning -

-``` - ### Answer (DEPRECATED: marked for removal) {::highlight-answer} diff --git a/lib/govspeak.rb b/lib/govspeak.rb index 16890ed..532a41f 100644 --- a/lib/govspeak.rb +++ b/lib/govspeak.rb @@ -201,10 +201,6 @@ def insert_strong_inside_p(body, parser = Govspeak::Document) #{Govspeak::Document.new(body.strip).to_html}\n) end - extension("important", surrounded_by("@")) do |body| - %(\n\n
#{insert_strong_inside_p(body)}
\n) - end - extension("helpful", surrounded_by("%")) do |body| %(\n\n
\n#{Govspeak::Document.new(body.strip).to_html}
\n) end diff --git a/test/govspeak_test.rb b/test/govspeak_test.rb index eb6b57f..3efca9b 100644 --- a/test/govspeak_test.rb +++ b/test/govspeak_test.rb @@ -176,27 +176,6 @@ class GovspeakTest < Minitest::Test assert_text_output "I am very informational" end - test_given_govspeak "@ I am very important @" do - assert_html_output %( -
-

I am very important

-
) - assert_text_output "I am very important" - end - - test_given_govspeak " - The following is very important - @ I am very important @ - " do - assert_html_output %( -

The following is very important

- -
-

I am very important

-
) - assert_text_output "The following is very important I am very important" - end - test_given_govspeak "% I am very helpful %" do assert_html_output %(
@@ -1478,14 +1457,6 @@ class GovspeakTest < Minitest::Test ' end - test_given_govspeak "@ Message with [a link](http://foo.bar/)@" do - assert_html_output %( -
-

Message with a link

-
- ) - end - test "sanitize source input by default" do document = Govspeak::Document.new("") assert_equal "", document.to_html.strip