summaryrefslogtreecommitdiff
path: root/test/substitutions_test.rb
diff options
context:
space:
mode:
authorDan Allen <dan.j.allen@gmail.com>2023-05-16 23:53:01 -0600
committerDan Allen <dan.j.allen@gmail.com>2023-05-17 00:33:14 -0600
commitf717cc76330eedfc627995437409ab2e8385cefa (patch)
tree6602b59a0abee73d07d0775f5b50a58f0a9548b4 /test/substitutions_test.rb
parent5b9f1225a68ba983f2486cd5be8fb47a7dc15570 (diff)
only match transitional role (x-) that this distinct from other roles
Diffstat (limited to 'test/substitutions_test.rb')
-rw-r--r--test/substitutions_test.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/substitutions_test.rb b/test/substitutions_test.rb
index 47a7bf6c..7b57c6d8 100644
--- a/test/substitutions_test.rb
+++ b/test/substitutions_test.rb
@@ -345,6 +345,12 @@ context 'Substitutions' do
end
# NOTE must use apply_subs because constrained monospaced is handled as a passthrough
+ test 'should ignore role that ends with transitional role on constrained monospace span' do
+ para = block_from_string %([foox-]`leave it alone`)
+ assert_equal '<code class="foox-">leave it alone</code>', para.apply_subs(para.source)
+ end
+
+ # NOTE must use apply_subs because constrained monospaced is handled as a passthrough
test 'escaped single-line constrained monospace string with forced compat role' do
para = block_from_string %([x-]#{BACKSLASH}`leave it alone`)
assert_equal '[x-]`leave it alone`', para.apply_subs(para.source)