diff options
| author | Dan Allen <dan.j.allen@gmail.com> | 2019-03-02 03:10:14 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-03-02 03:10:14 -0700 |
| commit | ab1addcaee8b3b2f0da64b92175bd98f99d02638 (patch) | |
| tree | ba15824082e498d092d9720a6931e8b18fbdb8c5 /test/paragraphs_test.rb | |
| parent | 9a6829dae5f330553760f83890a689be24a1485a (diff) | |
resolves #3123 rename hardbreaks document attribute to hardbreaks-option (PR #3124)
Diffstat (limited to 'test/paragraphs_test.rb')
| -rw-r--r-- | test/paragraphs_test.rb | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/test/paragraphs_test.rb b/test/paragraphs_test.rb index 4f01443a..da06fa6f 100644 --- a/test/paragraphs_test.rb +++ b/test/paragraphs_test.rb @@ -218,6 +218,24 @@ context 'Paragraphs' do assert_xpath '//p', output, 1 assert_includes output, "<p>read<br>\nmy<br>\nlips</p>" end + + test 'should be able to toggle hardbreaks by setting hardbreaks-option on document' do + input = <<~'EOS' + :hardbreaks-option: + + make + it + so + + :!hardbreaks: + + roll it back + EOS + + output = convert_string_to_embedded input + assert_xpath '(//p)[1]/br', output, 2 + assert_xpath '(//p)[2]/br', output, 0 + end end context 'Literal' do |
