From 83aaa4dbe6c04c251b1ca2ca892ac001563e3545 Mon Sep 17 00:00:00 2001 From: Dan Allen Date: Sun, 7 May 2017 17:45:57 -0600 Subject: process pass inline macro with empty text; invert extract logic --- test/substitutions_test.rb | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'test') 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 '', 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") -- cgit v1.2.3