summaryrefslogtreecommitdiff
path: root/test/lists_test.rb
diff options
context:
space:
mode:
authorDan Allen <dan.j.allen@gmail.com>2024-02-20 04:29:29 -0700
committerGitHub <noreply@github.com>2024-02-20 04:29:29 -0700
commit0ef9bb00b7f17305396d0cb7640eb080929ccbc9 (patch)
treeec26e33c295c8af1afbd3943bc7f3cc3d72e84f7 /test/lists_test.rb
parent5897ec073a37b1aba9f8240c7718ac970c4f47e5 (diff)
resolves #3693 don't break nested dlist with attached block if offset from parent list by empty line (PR #4512)
Diffstat (limited to 'test/lists_test.rb')
-rw-r--r--test/lists_test.rb18
1 files changed, 18 insertions, 0 deletions
diff --git a/test/lists_test.rb b/test/lists_test.rb
index e3a1d9da..3dc8b4c6 100644
--- a/test/lists_test.rb
+++ b/test/lists_test.rb
@@ -3092,6 +3092,24 @@ context 'Description lists (:dlist)' do
assert_css '.dlist .paragraph', output, 0
assert_css '.dlist + .paragraph', output, 1
end
+
+ test 'nested dlist with attached block offset by empty line' do
+ input = <<~'EOS'
+ category::
+
+ term 1:::
+ +
+ --
+ def 1
+ --
+ EOS
+ output = convert_string_to_embedded input
+ assert_xpath '//dl', output, 2
+ assert_xpath '//dl//dl', output, 1
+ assert_xpath '(//dl)[1]/dt[1][normalize-space(text()) = "category"]', output, 1
+ assert_xpath '(//dl)[1]//dl/dt[1][normalize-space(text()) = "term 1"]', output, 1
+ assert_xpath '(//dl)[1]//dl/dt[1]/following-sibling::dd//p[starts-with(text(), "def 1")]', output, 1
+ end
end
context 'Special lists' do