public
Fork of halorgium/mephisto
Description: A mirror of the mephisto code-base
Homepage: http://mephistoblog.com/
Clone URL: git://github.com/technoweenie/mephisto.git
Click here to lend your support to: mephisto and make a donation at www.pledgie.com !
Added link_to_section

git-svn-id: http://svn.techno-weenie.net/projects/mephisto/trunk@1488 
567b1171-46fb-0310-a4c9-b4bef9110e78
Caged (author)
Fri Aug 04 12:51:38 -0700 2006
commit  24286c7fbde127292ef457e2eded2baa5172a25a
tree    73a934e18f5bb2ba971c0a2d3473aa58438c0e9e
parent  47d39774b5530218bdade3f8ddab0e9bce5090fe
...
10
11
12
 
 
 
 
13
14
15
...
10
11
12
13
14
15
16
17
18
19
0
@@ -10,6 +10,10 @@ module Mephisto
0
       def link_to_comments(article)
0
         content_tag :a, pluralize(article['comments_count'], 'comment'), :href => article['url']
0
       end
0
+
0
+ def link_to_section(section)
0
+ content_tag :a, section['name'], :href => section['url']
0
+ end
0
 
0
       def escape_html(html)
0
         CGI::escapeHTML(html)
...
11
12
13
14
15
16
 
 
 
17
18
 
19
20
21
...
11
12
13
 
 
 
14
15
16
17
18
19
20
21
22
0
@@ -11,11 +11,12 @@ module FilteredColumn
0
       
0
       class << self
0
         def filter(text, options = {})
0
- patterns.inject(text) do |txt, pattern|
0
- txt.gsub(pattern) do |match|
0
- macros["#{$1}_macro"].filter(hash_from_attributes(match)) if macros.keys.include?("#{$1}_macro")
0
+ patterns.each do |pattern|
0
+ text.gsub!(pattern) do |match|
0
+ macros["#{$1}_macro"].filter(hash_from_attributes(match), $3, text) if macros.keys.include?("#{$1}_macro")
0
             end
0
           end
0
+ text
0
         end
0
       
0
         protected

Comments

    No one has commented yet.