*.py files suppport for preview in the wiki makro
This commit is contained in:
parent
7327be0895
commit
57cb656f5b
@ -410,7 +410,7 @@ class DmsfFile < ActiveRecord::Base
|
||||
|
||||
def preview(limit)
|
||||
result = 'No preview available'
|
||||
if (self.last_revision.disk_filename =~ /\.(txt|ini|diff|c|cpp|php|csv|rb|h|erb|html|css)$/i)
|
||||
if (self.last_revision.disk_filename =~ /\.(txt|ini|diff|c|cpp|php|csv|rb|h|erb|html|css|py)$/i)
|
||||
begin
|
||||
f = File.new(self.last_revision.disk_file)
|
||||
f.each_line do |line|
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user