summaryrefslogtreecommitdiff
path: root/test/extensions_test.rb
diff options
context:
space:
mode:
authorDan Allen <dan.j.allen@gmail.com>2019-02-24 03:58:58 -0700
committerDan Allen <dan.j.allen@gmail.com>2019-02-24 03:59:47 -0700
commitec0deb9dfa1dbdf754f7eff62c6e43d16c5d10de (patch)
tree9738032856c44d482f6a9e74b3bc0bdea693f0ee /test/extensions_test.rb
parentd9db048f784fb60bcceac97eaf1908ecd9ba7993 (diff)
only map unparsed attrlist of inline macro to target when format is short
Diffstat (limited to 'test/extensions_test.rb')
-rw-r--r--test/extensions_test.rb21
1 files changed, 20 insertions, 1 deletions
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|
+ %(<label>#{attrs['text']}</label>)
+ end
+ end
+ end
+
+ output = convert_string_to_embedded 'label:[Checkbox]'
+ assert_includes output, '<label>Checkbox</label>'
+ 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|
%(<label>#{target}</label>)
end