projects
/
arvados.git
/ blob
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
17170: More helpful message if ARVADOS_* env vars are not set.
[arvados.git]
/
doc
/
zenweb-fix-body.rb
1
require 'zenweb'
2
3
module ZenwebTextile
4
VERSION = '0.0.1'
5
end
6
7
module Zenweb
8
class Page
9
alias_method :old_body, :body
10
def body
11
# Don't try to parse binary files as text
12
if /\.(?:#{Site.binary_files.join("|")})$/ =~ path
13
@body ||= File.binread path
14
else
15
@body ||= begin
16
_, body = Zenweb::Config.split path
17
body.strip
18
end
19
end
20
end
21
end
22
end