summaryrefslogtreecommitdiff
path: root/test/parser_test.rb
diff options
context:
space:
mode:
authorDan Allen <dan.j.allen@gmail.com>2019-02-06 04:44:57 -0700
committerDan Allen <dan.j.allen@gmail.com>2019-02-08 13:06:29 -0700
commit174ab66d8a68e919ddfe1682729a437bd8122a69 (patch)
tree9eb82016c4bf9a679b05580268252589f61995e1 /test/parser_test.rb
parent75cf7389b0041b19bae863badb8b96f6c868e7b0 (diff)
resolves #3051 drop the options attribute
- don't store the options attribute on the block once the options are parsed - only store options as individual attributes (e.g., header-option) - add an options method on AbstractNode to retrieve the set of option names - store partial-option as empty string instead of true - reference low-level option attribute internally
Diffstat (limited to 'test/parser_test.rb')
-rw-r--r--test/parser_test.rb5
1 files changed, 2 insertions, 3 deletions
diff --git a/test/parser_test.rb b/test/parser_test.rb
index a2ce8e93..d54d6d30 100644
--- a/test/parser_test.rb
+++ b/test/parser_test.rb
@@ -109,8 +109,8 @@ context "Parser" do
assert_equal 'id', attributes['id']
assert_equal 'role', attributes['role']
assert_equal '', attributes['fragment-option']
- assert_equal 'fragment', attributes['options']
assert_equal 'style.role#id%fragment', attributes[1]
+ refute attributes.key? 'options'
end
test 'parse style attribute with style, id and multiple roles' do
@@ -160,10 +160,9 @@ context "Parser" do
end
test 'parse style attribute with option should preserve existing options' do
- attributes = { 1 => '%header', 'options' => 'footer', 'footer-option' => '' }
+ attributes = { 1 => '%header', 'footer-option' => '' }
style = Asciidoctor::Parser.parse_style_attribute(attributes)
assert_nil style
- assert_equal 'footer,header', attributes['options']
assert_equal '', attributes['header-option']
assert_equal '', attributes['footer-option']
end