Sha256: 31a07bcaacd3f017b1c35341994c74b1a898462e219f63d0c695919243d12700

Contents?: true

Size: 690 Bytes

Versions: 2

Compression:

Stored size: 690 Bytes

Contents

require 'spec_helper'

describe Kitabu::Markdown do
  it 'enables fenced code blocks' do
    html = Kitabu::Markdown.render <<-TEXT.strip_heredoc
      ```ruby
      class User
      end
      ```
    TEXT

    expect(html).to include('<pre class="highlight ruby">')
  end

  it 'enables options' do
    html = Kitabu::Markdown.render <<-TEXT.strip_heredoc
    ```php?start_inline=true
    echo 'Hello';
    ```
    TEXT

    expect(html).to include('<span class="k">echo</span>')
  end

  it 'does not raise with unknown lexers' do
    expect {
      Kitabu::Markdown.render <<-TEXT.strip_heredoc
      ```terminal
      Text plain.
      ```
      TEXT
    }.not_to raise_error
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
kitabu-2.1.0 spec/kitabu/markdown_spec.rb
kitabu-2.0.4 spec/kitabu/markdown_spec.rb