Skip to content
Browse files

dont parse the file twice

  • Loading branch information...
1 parent 4eeee52 commit f7e485796c30d572dcf2b0955b125b804239d71a @zzak zzak committed Mar 21, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 app.rb
2 app.rb
@@ -59,7 +59,7 @@
md ="#{params[:topic]}/#{params[:article]}.md")
formatter =
@toc = RDoc::Markdown.parse(md).accept(formatter)
- markdown :"#{params[:topic]}/#{params[:article]}"
+ markdown md
get '/style.css' do

2 comments on commit f7e4857

Sinatra member
kgrz commented on f7e4857 Mar 22, 2013

Even now it is being parsed twice isn't it? Now I see the why you started the Tilt extension :)

Sinatra member
zzak commented on f7e4857 Mar 22, 2013

it's parsing the markdown twice, once with TOC and second with Glorify::Renderer. but I assume that this will prevent it from reading the file twice from disk, which using the markdown from memory should be faster.

Please sign in to comment.
Something went wrong with that request. Please try again.