BlueCloth is back with vengeance

This commit is contained in:
Alexey Verkhovsky 2005-04-10 17:10:11 +00:00
parent f776807dff
commit 6f36e53290
5 changed files with 11 additions and 11 deletions

View file

@ -1,9 +1,7 @@
* TODO:
BlueCloth is back (RedCloth didn't do Markdown well enough to replace it).
* SVN trunk:
Handling of line breaks in Textile is as in 0.9 (inserts <br/> tag).
Upgraded rubyzip to version 0.5.8
BlueCloth is back (RedCloth didn't do pure Markdown well enough to replace it yet)
* 0.10.0:
Ported to ActionPack
RedCloth 3.0.3

View file

@ -33,7 +33,7 @@ module Engines
class Markdown < AbstractEngine
def mask
RedCloth.new(@content, @content.options[:engine_opts]).to_html(:block_textile_lists, :inline_textile_span, :markdown)
BlueCloth.new(@content, @content.options[:engine_opts]).to_html
end
end

View file

@ -38,6 +38,7 @@ unless defined? ADDITIONAL_LOAD_PATHS
vendor/rails/actionwebservice/lib
vendor/madeleine-0.7.1/lib
vendor/RedCloth-3.0.3/lib
vendor/BlueCloth-1.0.0/lib
vendor/rubyzip-0.5.8/lib
).map { |dir| "#{File.expand_path(File.join(RAILS_ROOT, dir))}"
}.delete_if { |dir| not File.exist?(dir) }

View file

@ -26,6 +26,7 @@ spec = Gem::Specification.new do |s|
s.add_dependency('madeleine', '= 0.7.1')
s.add_dependency('RedCloth', '= 3.0.3')
s.add_dependency('BlueCloth', '= 1.0.0')
s.add_dependency('rubyzip', '= 0.5.8')
s.add_dependency('rails', '= 0.11.1')
s.requirements << 'none'

View file

@ -54,7 +54,7 @@ class RevisionTest < Test::Unit::TestCase
@web.markup = :markdown
assert_markup_parsed_as(
%{<h1>My Headline</h1>\n\n\n\t<p>that <span class="newWikiWord">} +
%{<h1>My Headline</h1>\n\n<p>that <span class="newWikiWord">} +
%{Smart Engine GUI<a href="../show/SmartEngineGUI">?</a></span></p>},
"My Headline\n===========\n\nthat SmartEngineGUI")
@ -68,8 +68,8 @@ class RevisionTest < Test::Unit::TestCase
].join("\n")
assert_markup_parsed_as(
%{<p>This is a code block:</p>\n\n\n\t<pre><code>def a_method(arg)\n} +
%{return ThatWay</code></pre>\n\n\n\t<p>Nice!</p>},
%{<p>This is a code block:</p>\n\n<pre><code>def a_method(arg)\n} +
%{return ThatWay\n</code></pre>\n\n<p>Nice!</p>},
code_block)
textile_and_markdown = [
@ -85,10 +85,10 @@ class RevisionTest < Test::Unit::TestCase
].join("\n")
assert_markup_parsed_as(
"<h1>Markdown heading</h1>\n\n\n\t" +
"<p>h2. Textile heading</p>\n\n\n\t" +
"<p><strong>some</strong> <b>text</b> <em>with</em> <del>styles</del></p>\n\n\n\t" +
"<ul>\n\t<li>list 1</li>\n\t\t<li>list 2</li>\n\t</ul>",
"<h1>Markdown heading</h1>\n\n" +
"<p>h2. Textile heading</p>\n\n" +
"<p><em>some</em> <strong>text</strong> <em>with</em> -styles-</p>\n\n" +
"<ul>\n<li>list 1</li>\n<li>list 2</li>\n</ul>",
textile_and_markdown)
end