summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--test/substitutions_test.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/substitutions_test.rb b/test/substitutions_test.rb
index a69484d8..f097635a 100644
--- a/test/substitutions_test.rb
+++ b/test/substitutions_test.rb
@@ -505,6 +505,16 @@ context 'Substitutions' do
assert_equal para.source, para.sub_quotes(para.source)
end
+ test 'allow spaces in superscript if spaces are inserted using an attribute reference' do
+ para = block_from_string 'Night ^A{sp}poem{sp}by{sp}Jane{sp}Kondo^.'
+ assert_equal 'Night <sup>A poem by Jane Kondo</sup>.', para.apply_subs(para.source)
+ end
+
+ test 'allow spaces in superscript if text is wrapped in a passthrough' do
+ para = block_from_string 'Night ^+A poem by Jane Kondo+^.'
+ assert_equal 'Night <sup>A poem by Jane Kondo</sup>.', para.apply_subs(para.source)
+ end
+
test 'does not match adjacent superscript chars' do
para = block_from_string 'a ^^ b'
assert_equal 'a ^^ b', para.sub_quotes(para.source)