Update to Redcarpet 3.3.2.

f38
Vít Ondruch 10 years ago
parent b1194bd128
commit 0f4968cb17

1
.gitignore vendored

@ -1 +1,2 @@
/redcarpet-2.1.1.gem /redcarpet-2.1.1.gem
/redcarpet-3.3.2.gem

@ -1,127 +0,0 @@
diff --git a/test/redcarpet_test.rb b/test/redcarpet_test.rb
index 70e40ea..67bea67 100644
--- a/test/redcarpet_test.rb
+++ b/test/redcarpet_test.rb
@@ -83,8 +83,7 @@ EOS
<p>&lt;script&gt;BAD&lt;/script&gt;</p>
-<p>&lt;img src=&quot;/favicon.ico&quot; /&gt;
-
+<p>&lt;img src=&quot;/favicon.ico&quot; /&gt;</p>
EOE
markdown = render_with(@rndr[:escape_html], source)
@@ -93,7 +92,7 @@ EOE
def test_that_filter_html_works
markdown = render_with(@rndr[:no_html], 'Through <em>NO</em> <script>DOUBLE NO</script>')
- html_equal "<p>Through NO DOUBLE NO</p>", markdown
+ html_equal "<p>Through NO DOUBLE NO</p>\n", markdown
end
def test_filter_html_doesnt_break_two_space_hard_break
@@ -141,21 +140,21 @@ class MarkdownTest < Test::Unit::TestCase
def test_that_simple_one_liner_goes_to_html
assert_respond_to @markdown, :render
- html_equal "<p>Hello World.</p>", @markdown.render("Hello World.")
+ html_equal "<p>Hello World.</p>\n", @markdown.render("Hello World.")
end
def test_that_inline_markdown_goes_to_html
markdown = @markdown.render('_Hello World_!')
- html_equal "<p><em>Hello World</em>!</p>", markdown
+ html_equal "<p><em>Hello World</em>!</p>\n", markdown
end
def test_that_inline_markdown_starts_and_ends_correctly
markdown = render_with({:no_intra_emphasis => true}, '_start _ foo_bar bar_baz _ end_ *italic* **bold** <a>_blah_</a>')
- html_equal "<p><em>start _ foo_bar bar_baz _ end</em> <em>italic</em> <strong>bold</strong> <a><em>blah</em></a></p>", markdown
+ html_equal "<p><em>start _ foo_bar bar_baz _ end</em> <em>italic</em> <strong>bold</strong> <a><em>blah</em></a></p>\n", markdown
markdown = @markdown.render("Run 'rake radiant:extensions:rbac_base:migrate'")
- html_equal "<p>Run 'rake radiant:extensions:rbac_base:migrate'</p>", markdown
+ html_equal "<p>Run 'rake radiant:extensions:rbac_base:migrate'</p>\n", markdown
end
def test_that_urls_are_not_doubly_escaped
@@ -249,7 +248,7 @@ class MarkdownTest < Test::Unit::TestCase
def test_whitespace_after_urls
rd = render_with({:autolink => true}, "Japan: http://www.abc.net.au/news/events/japan-quake-2011/beforeafter.htm (yes, japan)")
- exp = %{<p>Japan: <a href="http://www.abc.net.au/news/events/japan-quake-2011/beforeafter.htm">http://www.abc.net.au/news/events/japan-quake-2011/beforeafter.htm</a> (yes, japan)</p>}
+ exp = %{<p>Japan: <a href="http://www.abc.net.au/news/events/japan-quake-2011/beforeafter.htm">http://www.abc.net.au/news/events/japan-quake-2011/beforeafter.htm</a> (yes, japan)</p>\n}
html_equal exp, rd
end
@@ -269,7 +268,7 @@ class MarkdownTest < Test::Unit::TestCase
end
def test_infinite_loop_in_header
- html_equal @markdown.render(<<-header), "<h1>Body</h1>"
+ html_equal @markdown.render(<<-header), "<h1>Body</h1>\n"
######
#Body#
######
@@ -313,7 +312,7 @@ fenced
def test_that_headers_are_linkable
markdown = @markdown.render('### Hello [GitHub](http://github.com)')
- html_equal "<h3>Hello <a href=\"http://github.com\">GitHub</a></h3>", markdown
+ html_equal "<h3>Hello <a href=\"http://github.com\">GitHub</a></h3>\n", markdown
end
def test_autolinking_with_ent_chars
@@ -338,7 +337,7 @@ class CustomRenderTest < Test::Unit::TestCase
def test_simple_overload
md = Redcarpet::Markdown.new(SimpleRender)
- html_equal "<p>This is <em class=\"cool\">just</em> a test</p>",
+ html_equal "<p>This is <em class=\"cool\">just</em> a test</p>\n",
md.render("This is *just* a test")
end
@@ -358,36 +357,36 @@ end
class RedcarpetCompatTest < Test::Unit::TestCase
def test_simple_compat_api
html = RedcarpetCompat.new("This is_just_a test").to_html
- html_equal "<p>This is<em>just</em>a test</p>", html
+ html_equal "<p>This is<em>just</em>a test</p>\n", html
end
def test_compat_api_enables_extensions
html = RedcarpetCompat.new("This is_just_a test", :no_intra_emphasis).to_html
- html_equal "<p>This is_just_a test</p>", html
+ html_equal "<p>This is_just_a test</p>\n", html
end
def test_compat_api_knows_fenced_code_extension
text = "```ruby\nx = 'foo'\n```"
html = RedcarpetCompat.new(text, :fenced_code).to_html
- html_equal "<pre><code class=\"ruby\">x = 'foo'\n</code></pre>", html
+ html_equal "<pre><code class=\"ruby\">x = 'foo'\n</code></pre>\n", html
end
def test_compat_api_ignores_gh_blockcode_extension
text = "```ruby\nx = 'foo'\n```"
html = RedcarpetCompat.new(text, :fenced_code, :gh_blockcode).to_html
- html_equal "<pre><code class=\"ruby\">x = 'foo'\n</code></pre>", html
+ html_equal "<pre><code class=\"ruby\">x = 'foo'\n</code></pre>\n", html
end
def test_compat_api_knows_no_intraemphasis_extension
html = RedcarpetCompat.new("This is_just_a test", :no_intraemphasis).to_html
- html_equal "<p>This is_just_a test</p>", html
+ html_equal "<p>This is_just_a test</p>\n", html
end
def test_translate_outdated_extensions
# these extensions are no longer used
exts = [:gh_blockcode, :no_tables, :smart, :strict]
html = RedcarpetCompat.new('"TEST"', *exts).to_html
- html_equal "<p>&quot;TEST&quot;</p>", html
+ html_equal "<p>&quot;TEST&quot;</p>\n", html
end
end

@ -1,26 +1,21 @@
%global gem_name redcarpet %global gem_name redcarpet
Summary: A fast, safe and extensible Markdown to (X)HTML parser
Name: rubygem-%{gem_name} Name: rubygem-%{gem_name}
Version: 2.1.1 Version: 3.3.2
Release: 13%{?dist} Release: 1%{?dist}
Summary: A fast, safe and extensible Markdown to (X)HTML parser
Group: Development/Languages Group: Development/Languages
License: ISC # https://github.com/vmg/redcarpet/issues/502
URL: http://github.com/tanoku/redcarpet License: MIT and ISC
Source0: http://rubygems.org/gems/%{gem_name}-%{version}.gem URL: http://github.com/vmg/redcarpet
Patch0: rubygem-redcarpet-libxml2-2.8-fix.patch Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem
BuildRequires: ruby(release)
BuildRequires: rubygems-devel BuildRequires: rubygems-devel
BuildRequires: ruby-devel BuildRequires: ruby-devel
BuildRequires: rubygem(test-unit) BuildRequires: rubygem(test-unit)
BuildRequires: rubygem(rake)
BuildRequires: rubygem(nokogiri)
BuildRequires: rubygem(rdoc)
%description %description
A fast, safe and extensible Markdown to (X)HTML parser A fast, safe and extensible Markdown to (X)HTML parser.
%package doc %package doc
@ -30,15 +25,14 @@ Requires: %{name} = %{version}-%{release}
BuildArch: noarch BuildArch: noarch
%description doc %description doc
Documentation for %{name} Documentation for %{name}.
%prep %prep
%setup -q -c -T %setup -q -c -T
%gem_install -n %{SOURCE0} %gem_install -n %{SOURCE0}
pushd .%{gem_instdir} # https://github.com/vmg/redcarpet/pull/503
%patch0 -p1 chmod a-x .%{gem_instdir}/ext/redcarpet/html.c
popd
%build %build
@ -56,12 +50,9 @@ cp -a .%{gem_extdir_mri}/{gem.build_complete,*.so} %{buildroot}%{gem_extdir_mri}
# Prevent dangling symlink in -debuginfo. # Prevent dangling symlink in -debuginfo.
rm -rf %{buildroot}%{gem_instdir}/ext rm -rf %{buildroot}%{gem_instdir}/ext
# Fix permissions
chmod 644 ./%{gem_instdir}/COPYING
%check %check
pushd .%{gem_instdir} pushd .%{gem_instdir}
ruby -Ilib:$(dirs +1)%{gem_extdir_mri} test/redcarpet_test.rb RUBYOPT=-Ilib:$(dirs +1)%{gem_extdir_mri}:test ruby -e 'Dir.glob "./test/**/*_test.rb", &method(:require)'
popd popd
%files %files
@ -72,10 +63,11 @@ popd
%{gem_extdir_mri} %{gem_extdir_mri}
%exclude %{gem_cache} %exclude %{gem_cache}
%{gem_spec} %{gem_spec}
%doc %{gem_instdir}/COPYING %license %{gem_instdir}/COPYING
%doc %{gem_instdir}/README.markdown %doc %{gem_instdir}/README.markdown
%files doc %files doc
%{gem_instdir}/Gemfile
%{gem_instdir}/Rakefile %{gem_instdir}/Rakefile
%{gem_instdir}/test %{gem_instdir}/test
%{gem_instdir}/%{gem_name}.gemspec %{gem_instdir}/%{gem_name}.gemspec
@ -83,6 +75,9 @@ popd
%changelog %changelog
* Wed Jul 08 2015 Vít Ondruch <vondruch@redhat.com> - 3.3.2-1
- Update to Redcarpet 3.3.2.
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.1.1-13 * Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.1.1-13
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild

@ -1 +1 @@
9fb22c5a84d5068362d78c95505dd307 redcarpet-2.1.1.gem 048b42d499b37c6dd02f2e438758f9b0 redcarpet-3.3.2.gem

Loading…
Cancel
Save