Closed stomar closed 10 years ago
Thanks @stomar. If you don't mind I'll keep this open until I have a fix that makes that test pass.
--- a/lib/maruku/input/rubypants.rb 2013-12-15 20:13:49.000000000 -0600
+++ b/lib/maruku/input/rubypants.rb 2014-05-07 16:19:35.000000000 -0500
@@ -172,7 +172,7 @@
end
end
else
- intersperse(first.split(pattern), replacement).each do |x|
+ intersperse(first.split(pattern,-1), replacement).each do |x|
append_to_output(output, x)
end
end
Thanks for the patch, @distler! Test and patch have been pushed.
Thanks!
Will there be a bugfix release sometime soon? (GitHub pages at the moment still uses Maruku by default.)
Just a postscript :
In investigating this, I noticed that Maruku spends 1/4-1/3 (!) of its time in Rubypants. That seems like a long amount of time for the sake of some curly quotes. Any optimizations that would speed up Rubypants would yield large dividends.
Yeah, it's a ton of global regexes, no wonder.
-Ben
Sent from my phone
On May 7, 2014, at 11:52 PM, Jacques Distler notifications@github.com wrote:
Just a postscript :
In investigating this, I noticed that Maruku spends 1/4-1/3 (!) of its time in Rubypants. That seems like a long amount of time for the sake of some curly quotes. Any optimizations that would speed up Rubypants would yield large dividends.
— Reply to this email directly or view it on GitHubhttps://github.com/bhollis/maruku/pull/131#issuecomment-42518512 .
There will be, eventually.
-Ben
Sent from my phone
On May 7, 2014, at 11:48 PM, Marcus Stollsteimer notifications@github.com wrote:
Thanks!
Will there be a bug fix release? (GitHub pages at the moment still uses Maruku by default.)
— Reply to this email directly or view it on GitHubhttps://github.com/bhollis/maruku/pull/131#issuecomment-42518339 .
Yeah, it's a ton of global regexes, no wonder.
Indeed.
I guess I never looked at it before. Far better to dispense with it entirely, and build the requisite education into the span-parser.
The speedup is even greater than I thought ( ~40% !).
Maruku 0.7.2 has been released. Thanks everyone! https://github.com/bhollis/maruku/blob/master/CHANGELOG.md
This adds a test case for issue #130.
(As of now it fails.)