Sha256: 1c6627f0622db612a5ef7eb42965225620087b74f7bb2d571de6b27ef9df06af

Contents?: true

Size: 405 Bytes

Versions: 14

Compression:

Stored size: 405 Bytes

Contents

# frozen_string_literal: true

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

14 entries across 14 versions & 3 rubygems

Version Path
commonmarker-0.23.4 test/test_linebreaks.rb
mountapi-0.11.1 vendor/bundle/ruby/2.7.0/gems/commonmarker-0.23.2/test/test_linebreaks.rb
commonmarker-0.23.2 test/test_linebreaks.rb
commonmarker-0.23.1 test/test_linebreaks.rb
commonmarker-0.23.0 test/test_linebreaks.rb
commonmarker-0.22.0 test/test_linebreaks.rb
tdiary-5.1.6 vendor/bundle/ruby/2.7.0/gems/commonmarker-0.21.2/test/test_linebreaks.rb
commonmarker-0.21.2 test/test_linebreaks.rb
commonmarker-0.21.1 test/test_linebreaks.rb
commonmarker-0.21.0 test/test_linebreaks.rb
commonmarker-0.20.2 test/test_linebreaks.rb
commonmarker-0.20.1 test/test_linebreaks.rb
commonmarker-0.20.0 test/test_linebreaks.rb
commonmarker-0.19.0 test/test_linebreaks.rb