Skip to content

Commit

Permalink
add test to verify attribute entries above tabs block are preserved w…
Browse files Browse the repository at this point in the history
…hen filetype is not html
  • Loading branch information
mojavelinux committed Jul 26, 2023
1 parent 006af1f commit edc0e88
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions spec/tabs_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -926,6 +926,37 @@ def convert_ulist node
(expect actual).to eql expected
end

it '.only should preserve attribute entries in body when filetype is not html' do
input = <<~'END'
before
:foo: bar
[tabs]
====
foo:: {foo}
====
END
expected = <<~'END'.chomp
<simpara>before</simpara>
<variablelist>
<varlistentry>
<term>foo</term>
<listitem>
<simpara>bar</simpara>
</listitem>
</varlistentry>
</variablelist>
END

with_memory_logger :info do |logger|
doc = Asciidoctor.load input, backend: 'docbook'
actual = doc.convert
(expect actual).to eql expected
(expect logger).to be_empty
end
end

it 'should add is-sync class to tabs block if tabs-sync-option is set on document' do
input = <<~END
:tabs-sync-option:
Expand Down

0 comments on commit edc0e88

Please sign in to comment.