summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorDan Allen <dan.j.allen@gmail.com>2022-07-05 01:55:45 -0600
committerGitHub <noreply@github.com>2022-07-05 01:55:45 -0600
commit7822fbe9223ca81e9895f6132b2274e89f26c623 (patch)
tree634d315adf29cfe5df18647d2e87fffe7afb67de /test
parent3c575b9de21790d3b812c74948c42eb6470ec02b (diff)
resolves #4306 disallow the use of the left square bracket in an attribute list on formatted text (PR #4307)
Diffstat (limited to 'test')
-rw-r--r--test/substitutions_test.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/substitutions_test.rb b/test/substitutions_test.rb
index b4b4ab09..f75abfa4 100644
--- a/test/substitutions_test.rb
+++ b/test/substitutions_test.rb
@@ -203,6 +203,11 @@ context 'Substitutions' do
assert_equal '<span class="statement">a few words</span>', para.sub_quotes(para.source)
end
+ test 'does not recognize attribute list with left square bracket on formatted text' do
+ para = block_from_string 'key: [ *before [.redacted]#redacted# after* ]'
+ assert_equal 'key: [ <strong>before <span class="redacted">redacted</span> after</strong> ]', para.sub_quotes(para.source)
+ end
+
test 'single-line constrained strong string' do
para = block_from_string '*a few strong words*'
assert_equal '<strong>a few strong words</strong>', para.sub_quotes(para.source)