public
Description: StrokeDB is an embeddable distributed document database written in Ruby
Homepage: http://strokedb.com/
Clone URL: git://github.com/yrashk/strokedb.git
Search Repo:
fix issue with missing [[links]]
crossblaim (author)
Tue Apr 15 09:18:11 -0700 2008
commit  4b9941a67f7dcb8009b26eb51a97b65255f35b6c
tree    f113e6606d00f5b801cfe5bb9d6fd3860585ee88
parent  9dab1afd0c970fa473886044389766d4c67bb0c6
...
24
25
26
27
28
29
30
...
37
38
39
40
 
41
42
43
...
48
49
50
 
51
52
53
...
24
25
26
 
27
28
29
...
36
37
38
 
39
40
41
42
...
47
48
49
50
51
52
53
0
@@ -24,7 +24,6 @@ Page = StrokeDB::Meta.new do
0
   end
0
   
0
   before_save do |doc|
0
- doc[:filtered_body] = RedCloth.new(doc[:body], []).to_html
0
     doc[:updated_at] = Time.now
0
   end
0
   
0
@@ -37,7 +36,7 @@ Page = StrokeDB::Meta.new do
0
   # linked to page does not already exist
0
   def display_body
0
     # mostly taken from JunebugWiki, regexps this beautiful should be shared
0
- self.filtered_body.gsub(/\[\[([\w0-9A-Za-z -]+)[|]?([^\]]*)\]\]/) do
0
+ content = self.body.gsub(/\[\[([\w0-9A-Za-z -]+)[|]?([^\]]*)\]\]/) do
0
       page = title = $1.strip
0
       title = $2 unless $2.empty?
0
       page_url = page.gsub(/ /, '_')
0
@@ -48,6 +47,7 @@ Page = StrokeDB::Meta.new do
0
         %Q{<span>#{title}<a href="/new/#{page_url}">?</a></span>}
0
       end
0
     end
0
+ RedCloth.new(content, []).to_html
0
   end
0
 end
0
  

Comments

    No one has commented yet.