summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorDan Allen <dan.j.allen@gmail.com>2017-05-07 17:45:57 -0600
committerDan Allen <dan.j.allen@gmail.com>2017-05-07 17:45:57 -0600
commit83aaa4dbe6c04c251b1ca2ca892ac001563e3545 (patch)
tree0f1f55e12582e93be6cff3cb1799e9327b82f604 /test
parentd16b42fbecc9b5141dd40c4eeb2d5af896e9c128 (diff)
process pass inline macro with empty text; invert extract logic
Diffstat (limited to 'test')
-rw-r--r--test/substitutions_test.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/substitutions_test.rb b/test/substitutions_test.rb
index 1e98670d..34e6f076 100644
--- a/test/substitutions_test.rb
+++ b/test/substitutions_test.rb
@@ -1360,6 +1360,13 @@ EOS
assert_equal '<strong><html5></strong>', result
end
+ test 'should allow content of inline pass macro to be empty' do
+ para = block_from_string 'pass:[]'
+ result = para.extract_passthroughs para.source
+ assert_equal 1, para.passthroughs.size
+ assert_equal '', para.restore_passthroughs(result)
+ end
+
# NOTE placeholder is surrounded by text to prevent reader from stripping trailing boundary char (unique to test scenario)
test 'restore inline passthroughs without subs' do
para = block_from_string("some #{Asciidoctor::Substitutors::PASS_START}" + '0' + "#{Asciidoctor::Substitutors::PASS_END} to study")