Created
August 27, 2009 03:44
-
-
Save clairvy/176065 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/lib/redcloth3.rb b/lib/redcloth3.rb | |
| index e99ccdf..19e9746 100644 | |
| --- a/lib/redcloth3.rb | |
| +++ b/lib/redcloth3.rb | |
| @@ -270,7 +270,7 @@ class RedCloth3 < String | |
| @urlrefs = {} | |
| @shelf = [] | |
| - textile_rules = [:refs_textile, :block_textile_table, :block_textile_lists, | |
| + textile_rules = [:block_textile_table, :block_textile_lists, | |
| :block_textile_prefix, :inline_textile_image, :inline_textile_link, | |
| :inline_textile_code, :inline_textile_span, :glyphs_textile] | |
| markdown_rules = [:refs_markdown, :block_markdown_setext, :block_markdown_atx, :block_markdown_rule, | |
| diff --git a/test/unit/helpers/application_helper_test.rb b/test/unit/helpers/application_helper_test.rb | |
| index 2dc5067..33be718 100644 | |
| --- a/test/unit/helpers/application_helper_test.rb | |
| +++ b/test/unit/helpers/application_helper_test.rb | |
| @@ -468,4 +468,12 @@ EXPECTED | |
| Setting.gravatar_enabled = '0' | |
| assert_nil avatar(User.find_by_mail('[email protected]')) | |
| end | |
| + | |
| + def test_ignore_refs | |
| + to_test = { | |
| + 'abcdef' => 'abcdef', | |
| + "[abc]def\nghi" => "[abc]def<br />ghi", | |
| + } | |
| + to_test.each { |text, result| assert_equal "<p>#{result}</p>", textilizable(text) } | |
| + end | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment