From ec0deb9dfa1dbdf754f7eff62c6e43d16c5d10de Mon Sep 17 00:00:00 2001 From: Dan Allen Date: Sun, 24 Feb 2019 03:58:58 -0700 Subject: only map unparsed attrlist of inline macro to target when format is short --- test/extensions_test.rb | 21 ++++++++++++++++++++- test/links_test.rb | 2 +- 2 files changed, 21 insertions(+), 2 deletions(-) (limited to 'test') diff --git a/test/extensions_test.rb b/test/extensions_test.rb index 4825b9bc..2969386c 100644 --- a/test/extensions_test.rb +++ b/test/extensions_test.rb @@ -1128,7 +1128,26 @@ context 'Extensions' do inline_macro do named :label with_format :short - resolves_attributes false + parses_content_as :text + process do |parent, _, attrs| + %() + end + end + end + + output = convert_string_to_embedded 'label:[Checkbox]' + assert_includes output, '' + ensure + Asciidoctor::Extensions.unregister_all + end + end + + test 'should map unparsed attrlist to target when format is short' do + begin + Asciidoctor::Extensions.register do + inline_macro do + named :label + with_format :short process do |parent, target| %() end diff --git a/test/links_test.rb b/test/links_test.rb index bf2615df..431ad43e 100644 --- a/test/links_test.rb +++ b/test/links_test.rb @@ -860,7 +860,7 @@ context 'Links' do assert_nil ref.reftext end - test 'wip anchor with label creates reference' do + test 'anchor with label creates reference' do doc = document_from_string '[[tigers,Tigers]]Tigers roam here.' ref = doc.catalog[:refs]['tigers'] refute_nil ref -- cgit v1.2.3