Sha256: 8b19f6d764ec00b96cb0436ce3833735dc4720c0930a7780e9f2c2ed98e3a3e8
Contents?: true
Size: 1.07 KB
Versions: 1
Compression:
Stored size: 1.07 KB
Contents
require 'helper' class TestKramdown < Test::Unit::TestCase context "kramdown" do setup do @config = { 'markdown' => 'kramdown', 'kramdown' => { 'auto_ids' => false, 'footnote_nr' => 1, 'entity_output' => 'as_char', 'toc_levels' => '1..6', 'smart_quotes' => 'lsquo,rsquo,ldquo,rdquo' } } end # http://kramdown.rubyforge.org/converter/html.html#options should "pass kramdown options" do markdown = MarkdownConverter.new(@config) assert_equal "<h1>Some Header</h1>", markdown.convert('# Some Header #').strip end should "convert quotes to smart quotes" do markdown = MarkdownConverter.new(@config) assert_equal "<p>“Pit’hy”</p>", markdown.convert(%{"Pit'hy"}).strip override = { 'kramdown' => { 'smart_quotes' => 'lsaquo,rsaquo,laquo,raquo' } } markdown = MarkdownConverter.new(@config.deep_merge(override)) assert_equal "<p>«Pit›hy»</p>", markdown.convert(%{"Pit'hy"}).strip end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
jekyll-0.12.1 | test/test_kramdown.rb |