Sha256: 7639b48661e6643498ad32227e26f42beb9a9bff9389cb1acbf1be28a7025ff9

Contents?: true

Size: 374 Bytes

Versions: 16

Compression:

Stored size: 374 Bytes

Contents

require 'test_helper'

class TestLinebreaks < Minitest::Test
  def test_hardbreak_no_spaces
    doc = CommonMarker.render_doc("foo\nbaz")
    assert_equal "<p>foo<br />\nbaz</p>\n", doc.to_html(:hardbreaks)
  end

  def test_hardbreak_with_spaces
    doc = CommonMarker.render_doc("foo  \nbaz")
    assert_equal "<p>foo<br />\nbaz</p>\n", doc.to_html(:hardbreaks)
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
commonmarker-0.14.4 test/test_linebreaks.rb
commonmarker-0.14.3 test/test_linebreaks.rb
commonmarker-0.14.2 test/test_linebreaks.rb
commonmarker-0.14.1 test/test_linebreaks.rb
commonmarker-0.14.0 test/test_linebreaks.rb
commonmarker-0.13.0 test/test_linebreaks.rb
commonmarker-0.12.0 test/test_linebreaks.rb
commonmarker-0.11.0 test/test_linebreaks.rb
commonmarker-0.10.0 test/test_linebreaks.rb
commonmarker-0.9.2 test/test_linebreaks.rb
commonmarker-0.9.1 test/test_linebreaks.rb
commonmarker-0.9.0 test/test_linebreaks.rb
commonmarker-0.8.0 test/test_linebreaks.rb
commonmarker-0.7.0 test/test_linebreaks.rb
commonmarker-0.6.0 test/test_linebreaks.rb
commonmarker-0.5.1 test/test_linebreaks.rb