Sha256: e33ec191563dfc89cf120197af056fe9185d4807dd369b3a5cb8e8df302483d7

Contents?: true

Size: 816 Bytes

Versions: 10

Compression:

Stored size: 816 Bytes

Contents

# frozen_string_literal: true

require 'test_helper'

class TestExtensions < Minitest::Test
  def test_full_info_string
    md = <<~MD
      ```ruby
      module Foo
      ```
    MD

    CommonMarker.render_html(md, :FULL_INFO_STRING).tap do |out|
      assert_includes out, '<pre><code class="language-ruby">'
    end

    md = <<~MD
      ```ruby my info string
      module Foo
      ```
    MD

    CommonMarker.render_html(md, :FULL_INFO_STRING).tap do |out|
      assert_includes out, '<pre><code class="language-ruby" data-meta="my info string">'
    end

    md = <<~MD
      ```ruby my \x00 string
      module Foo
      ```
    MD

    CommonMarker.render_html(md, :FULL_INFO_STRING).tap do |out|
      assert_includes out, %(<pre><code class="language-ruby" data-meta="my � string">)
    end
  end
end

Version data entries

10 entries across 10 versions & 3 rubygems

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