From bb2d16c8a14ff1bac0fe3617e2bc66609ec49101 Mon Sep 17 00:00:00 2001 From: Alexey Verkhovsky Date: Thu, 10 Feb 2005 23:11:47 +0000 Subject: [PATCH] Upgraded RedCloth to 3.0.3 --- CHANGELOG | 1 + config/environment.rb | 2 +- rakefile.rb | 2 +- script/breakpointer | 2 +- test/unit/revision_test.rb | 8 +- vendor/RedCloth-3.0.3/RedCloth.gemspec | 52 + vendor/RedCloth-3.0.3/bin/redcloth | 3 + .../doc/CHANGELOG | 38 + .../doc/COPYING | 0 .../doc/README | 26 +- .../doc/REFERENCE | 0 .../doc/make.rb | 22 +- .../install.rb | 0 vendor/RedCloth-3.0.3/lib/redcloth.rb | 1113 +++++++++++++++++ .../run-tests.rb | 12 +- .../tests/code.yml | 39 + .../tests/images.yml | 96 +- .../tests/instiki.yml | 10 +- .../tests/links.yml | 3 + .../tests/lists.yml | 10 +- vendor/RedCloth-3.0.3/tests/markdown.yml | 218 ++++ vendor/RedCloth-3.0.3/tests/poignant.yml | 64 + vendor/RedCloth-3.0.3/tests/table.yml | 198 +++ .../tests/textism.yml | 25 +- vendor/redcloth-2.0.11/RedCloth.gemspec | 34 - vendor/redcloth-2.0.11/lib/redcloth.rb | 894 ------------- vendor/redcloth-2.0.11/tests/poignant.yml | 64 - 27 files changed, 1844 insertions(+), 1092 deletions(-) create mode 100644 vendor/RedCloth-3.0.3/RedCloth.gemspec create mode 100644 vendor/RedCloth-3.0.3/bin/redcloth rename vendor/{redcloth-2.0.11 => RedCloth-3.0.3}/doc/CHANGELOG (76%) mode change 100755 => 100644 rename vendor/{redcloth-2.0.11 => RedCloth-3.0.3}/doc/COPYING (100%) mode change 100755 => 100644 rename vendor/{redcloth-2.0.11 => RedCloth-3.0.3}/doc/README (77%) mode change 100755 => 100644 rename vendor/{redcloth-2.0.11 => RedCloth-3.0.3}/doc/REFERENCE (100%) mode change 100755 => 100644 rename vendor/{redcloth-2.0.11 => RedCloth-3.0.3}/doc/make.rb (94%) mode change 100755 => 100644 rename vendor/{redcloth-2.0.11 => RedCloth-3.0.3}/install.rb (100%) mode change 100755 => 100644 create mode 100644 vendor/RedCloth-3.0.3/lib/redcloth.rb rename vendor/{redcloth-2.0.11 => RedCloth-3.0.3}/run-tests.rb (55%) mode change 100755 => 100644 rename vendor/{redcloth-2.0.11 => RedCloth-3.0.3}/tests/code.yml (58%) mode change 100755 => 100644 rename vendor/{redcloth-2.0.11 => RedCloth-3.0.3}/tests/images.yml (73%) mode change 100755 => 100644 rename vendor/{redcloth-2.0.11 => RedCloth-3.0.3}/tests/instiki.yml (96%) mode change 100755 => 100644 rename vendor/{redcloth-2.0.11 => RedCloth-3.0.3}/tests/links.yml (90%) mode change 100755 => 100644 rename vendor/{redcloth-2.0.11 => RedCloth-3.0.3}/tests/lists.yml (93%) mode change 100755 => 100644 create mode 100644 vendor/RedCloth-3.0.3/tests/markdown.yml create mode 100644 vendor/RedCloth-3.0.3/tests/poignant.yml create mode 100644 vendor/RedCloth-3.0.3/tests/table.yml rename vendor/{redcloth-2.0.11 => RedCloth-3.0.3}/tests/textism.yml (97%) mode change 100755 => 100644 delete mode 100755 vendor/redcloth-2.0.11/RedCloth.gemspec delete mode 100755 vendor/redcloth-2.0.11/lib/redcloth.rb delete mode 100755 vendor/redcloth-2.0.11/tests/poignant.yml diff --git a/CHANGELOG b/CHANGELOG index 7b6c70d0..2a6a962f 100755 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,4 +1,5 @@ HEAD: + RedCloth 3.0.3 (read: mixing Textile and Markdown in the same page) Files/pictures can be uploaded to a wiki and served from / displayed in wiki pages Wiki link syntax doesn't conflict with Textile hyperlink syntax. Therefore "textile link":LinkToSomePlace will not look insane. diff --git a/config/environment.rb b/config/environment.rb index 40fe2d51..2c32f084 100644 --- a/config/environment.rb +++ b/config/environment.rb @@ -31,7 +31,7 @@ unless defined? ADDITIONAL_LOAD_PATHS ADDITIONAL_LOAD_PATHS.concat %w( vendor/bluecloth-1.0.0/lib vendor/madeleine-0.7.1/lib - vendor/redcloth-2.0.11/lib + vendor/RedCloth-3.0.3/lib vendor/rubyzip-0.5.6 vendor/actionpack/lib vendor/activesupport/lib diff --git a/rakefile.rb b/rakefile.rb index 2b5986f0..8349aadb 100755 --- a/rakefile.rb +++ b/rakefile.rb @@ -27,7 +27,7 @@ Rake::TestTask.new { |t| t.libs << 'app/models' t.libs << 'vendor/bluecloth-1.0.0/lib' t.libs << 'vendor/madeleine-0.7.1/lib' - t.libs << 'vendor/redcloth-2.0.11/lib' + t.libs << 'vendor/RedCloth-3.0.3/lib' t.libs << 'vendor/rubyzip-0.5.6' t.pattern = 'test/**/*_test.rb' t.verbose = true diff --git a/script/breakpointer b/script/breakpointer index 9f17b113..0322c5e8 100755 --- a/script/breakpointer +++ b/script/breakpointer @@ -18,7 +18,7 @@ ADDITIONAL_LOAD_PATHS.concat %w( ADDITIONAL_LOAD_PATHS.concat %w( vendor/bluecloth-1.0.0/lib vendor/madeleine-0.7.1/lib - vendor/redcloth-2.0.11/lib + vendor/RedCloth-3.0.3/lib vendor/rubyzip-0.5.6 vendor/actionpack/lib vendor/activesupport/lib diff --git a/test/unit/revision_test.rb b/test/unit/revision_test.rb index 4d4a0f71..28d41453 100755 --- a/test/unit/revision_test.rb +++ b/test/unit/revision_test.rb @@ -116,7 +116,7 @@ class RevisionTest < Test::Unit::TestCase def test_content_with_pre_blocks assert_markup_parsed_as( - 'A class SmartEngine end would not mark up
CodeBlocks
', + '

A class SmartEngine end would not mark up

CodeBlocks

', 'A class SmartEngine end would not mark up
CodeBlocks
') end @@ -168,7 +168,7 @@ class RevisionTest < Test::Unit::TestCase def test_double_replacing @revision.content = "VersionHistory\r\n\r\ncry VersionHistory" assert_equal '

Version History' + - "?

\n\n\t

cry " + + "?

\n\n\n\t

cry " + 'Version History?' + '

', @revision.display_content @@ -176,8 +176,8 @@ class RevisionTest < Test::Unit::TestCase @revision.clear_display_cache @revision.content = "f\r\nVersionHistory\r\n\r\ncry VersionHistory" - assert_equal "

f
\nVersion History" + - "?

\n\n\t

cry " + + assert_equal "

f\nVersion History" + + "?

\n\n\n\t

cry " + "Version History?" + "

", @revision.display_content diff --git a/vendor/RedCloth-3.0.3/RedCloth.gemspec b/vendor/RedCloth-3.0.3/RedCloth.gemspec new file mode 100644 index 00000000..ca64b780 --- /dev/null +++ b/vendor/RedCloth-3.0.3/RedCloth.gemspec @@ -0,0 +1,52 @@ +require 'rubygems' +spec = Gem::Specification.new do |s| + + ## Basic Information + + s.name = 'RedCloth' + s.version = "3.0.3" + s.platform = Gem::Platform::RUBY + s.summary = <<-TXT + RedCloth is a module for using Textile and Markdown in Ruby. Textile and Markdown are text formats. + A very simple text format. Another stab at making readable text that can be converted to HTML. + TXT + s.description = <<-TXT + No need to use verbose HTML to build your docs, your blogs, your pages. Textile gives you readable text while you're writing and beautiful text for your readers. And if you need to break out into HTML, Textile will allow you to do so. + + Textile also handles some subtleties of formatting which will enhance your document's readability: + + * Single- and double-quotes around words or phrases are converted to curly quotations, much easier on + the eye. "Observe!" + + * Double hyphens are replaced with an em-dash. Observe -- very nice! + + * Single hyphens are replaced with en-dashes. Observe - so cute! + + * Triplets of periods become an ellipsis. Observe... + + * The letter 'x' becomes a dimension sign when used alone. Observe: 2 x 2. + + * Conversion of ==(TM)== to (TM), ==(R)== to (R), ==(C)== to (C). + + For more on Textile's language, hop over to "A Textile Reference":http://hobix.com/textile/. For more + on Markdown, see "Daring Fireball's page":http://daringfireball.net/projects/markdown/. + TXT + + ## Include tests, libs, docs + + s.files = ['bin/**/*', 'tests/**/*', 'lib/**/*', 'docs/**/*', 'run-tests.rb'].collect do |dirglob| + Dir.glob(dirglob) + end.flatten.delete_if {|item| item.include?("CVS")} + + ## Load-time details + + s.require_path = 'lib' + s.autorequire = 'redcloth' + + ## Author and project details + + s.author = "Why the Lucky Stiff" + s.email = "why@ruby-lang.org" + s.rubyforge_project = "redcloth" + s.homepage = "http://www.whytheluckystiff.net/ruby/redcloth/" +end diff --git a/vendor/RedCloth-3.0.3/bin/redcloth b/vendor/RedCloth-3.0.3/bin/redcloth new file mode 100644 index 00000000..81abf7db --- /dev/null +++ b/vendor/RedCloth-3.0.3/bin/redcloth @@ -0,0 +1,3 @@ +#!/usr/local/bin/ruby18 +require 'redcloth' +puts RedCloth.new( ARGF.read ).to_html diff --git a/vendor/redcloth-2.0.11/doc/CHANGELOG b/vendor/RedCloth-3.0.3/doc/CHANGELOG old mode 100755 new mode 100644 similarity index 76% rename from vendor/redcloth-2.0.11/doc/CHANGELOG rename to vendor/RedCloth-3.0.3/doc/CHANGELOG index 6f2fa5bf..7b5f9cf3 --- a/vendor/redcloth-2.0.11/doc/CHANGELOG +++ b/vendor/RedCloth-3.0.3/doc/CHANGELOG @@ -1,4 +1,42 @@ --- %YAML:1.0 +- version: 3.0.3 + date: 2005-02-06 + changes: + - Stack overflow regexp on code inlines obliterated. + - Citations scaled back. + - Toggle span tags on CAPS with :no_span_tags accessor. + +- version: 3.0.2 + date: 2005-02-02 + changes: + - Stack overflow Regexps replaced. + - All code blocks protected from formatting. + - Hard breaks working. + - Filter HTML now uses detailed cleaner. + +- version: 3.0.1 + date: 2004-11-15 + changes: + - Using `float' rather than `text-align' to align image blocks. + - Shelving more HTML attributes to prevent them from clashing with Textile glyphs. + - Simplifying the block regexp. + +- version: 3.0 + date: 2004-10-26 + changes: + - Broke up the Textile engine into smaller parts, recoded central block parser. + - Added preliminary support for Markdown. + - Added support for custom Textile prefixes. + - RedCloth now generates XHTML fragments. + - Complete HTML documents should now work, RedCloth ignores complex HTML. + +- version: 2.0.12 + date: 2004-08-09 + changes: + - Escaping tighter for
 tags that share a single line.
+    - No more String#htmlesc!.  Moved to RedCloth#htmlesc.
+    - Pruned out the code that was handling multibyte.
+
 - version: 2.0.11
   date: 2004-06-01
   changes:
diff --git a/vendor/redcloth-2.0.11/doc/COPYING b/vendor/RedCloth-3.0.3/doc/COPYING
old mode 100755
new mode 100644
similarity index 100%
rename from vendor/redcloth-2.0.11/doc/COPYING
rename to vendor/RedCloth-3.0.3/doc/COPYING
diff --git a/vendor/redcloth-2.0.11/doc/README b/vendor/RedCloth-3.0.3/doc/README
old mode 100755
new mode 100644
similarity index 77%
rename from vendor/redcloth-2.0.11/doc/README
rename to vendor/RedCloth-3.0.3/doc/README
index 7a5cb1f6..1ae4560c
--- a/vendor/redcloth-2.0.11/doc/README
+++ b/vendor/RedCloth-3.0.3/doc/README
@@ -1,17 +1,19 @@
-p=. !redcloth-title.png!
+p=. !redcloth3-title.png!