This project is archived and is in readonly mode.
Add options passing to textilze helper
-
Matt Jones
The loop over options doesn't make sense - that's nearly the same code that TextileDoc.new executes. Why repeat it?
-
Magnus Bergmark
I agree. It was there in the original code (hardcoded to only
:heard_breaks, though) so I thought it was necessary for some form of backwards compatibility.I traced back the code and it seems to have appeared 2005 in the SVN repo. A git show on this commit might show people more:
commit 810ebf7c6a2e9d02f76d8727e56c1706cc6ff66e Author: David Heinemeier Hansson <david@loudthinking.com> Date: Sun Oct 2 20:21:43 2005 +0000
Forced newer versions of RedCloth to use hard breaks [DHH] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2436 5ecf4fe2-1ee6-0310-87b1-e25e094e27de</code>
I think this is redundant now. Here's a new patch without this loop. Someone more knowledgeable can choose which patch looks better.
-
Rizwan Reza
- Assigned user set to Michael Koziarski
- Tag changed from 2.3.x, feature_request, helper, patch, text_helper to 2.3.x, bugmash, feature_request, helper, patch, text_helper
verified
+1 I have attached an updated patch. There were no test cases in text_helper_test.rb so I added a couple of those.
-
Rizwan Reza
verified
+1 This works on master. I have employed the changes advised by nzkoz.
-
Rizwan Reza
verified
+1 Added one more test for hard_breaks. Refactored.
-
Rizwan Reza
- Tag changed from 2.3.x, bugmash, feature_request, helper, patch, text_helper to 3.0, bugmash, feature_request, helper, patch, text_helper
This is for master branch.
-
Rizwan Reza
verified
By the way, though nzkoz suggests that this should be applied to master.. this passes cleanly on 2-3-stable too.
-
David Trasbo
This patch does not apply to master:
<stdin>:29: trailing whitespace. <stdin>:54: trailing whitespace. <stdin>:58: trailing whitespace. <stdin>:62: trailing whitespace. <stdin>:66: trailing whitespace. error: patch failed: actionpack/lib/action_view/helpers/text_helper.rb:241 error: actionpack/lib/action_view/helpers/text_helper.rb: patch does not apply error: patch failed: actionpack/test/template/text_helper_test.rb:1 error: actionpack/test/template/text_helper_test.rb: patch does not apply(With --whitespace=fix)
-
Rizwan Reza
Applies cleanly on my side. Just rechecked.
-
Repository
- State changed from new to resolved
(from [7dbb2b6f83c5a1a5f4ef0a97fee5322957977306]) Support passing Redcloth options via textilize helper [#2973 Add options passing to textilze helper state:resolved]
Signed-off-by: Pratik Naik pratiknaik@gmail.com
http://github.com/rails/rails/commit/7dbb2b6f83c5a1a5f4ef0a97fee532... -
Repository
(from [d1202cfeb2cc7961c93a33ef3f5622d5393186f1]) Support passing Redcloth options via textilize helper [#2973 Add options passing to textilze helper state:resolved]
Signed-off-by: Pratik Naik pratiknaik@gmail.com
http://github.com/rails/rails/commit/d1202cfeb2cc7961c93a33ef3f5622... -
David Trasbo
verified
Must have been something wrong with my clone. Sorry about that.
-
CancelProfileIsBroken
- Assigned user cleared.
- Tag changed from 3.0, bugmash, feature_request, helper, patch, text_helper to 3.0, feature_request, helper, patch, text_helper
