annotate .svn/pristine/f7/f72d15e7793c4539e89571293a216e4135d03c64.svn-base @ 1082:997f6d7738f7 bug_531

In repo controller entry action, show the page for the file even if it's binary (so user still has access to history etc links). This makes it possible to use the entry action as the default when a file is clicked on
author Chris Cannam <chris.cannam@soundsoftware.ac.uk>
date Thu, 22 Nov 2012 18:04:17 +0000
parents cbb26bc654de
children
rev   line source
Chris@909 1 module CodeRay
Chris@909 2 module Encoders
Chris@909 3
Chris@909 4 load :html
Chris@909 5
Chris@909 6 # Wraps HTML output into a DIV element, using inline styles by default.
Chris@909 7 #
Chris@909 8 # See Encoders::HTML for available options.
Chris@909 9 class Div < HTML
Chris@909 10
Chris@909 11 FILE_EXTENSION = 'div.html'
Chris@909 12
Chris@909 13 register_for :div
Chris@909 14
Chris@909 15 DEFAULT_OPTIONS = HTML::DEFAULT_OPTIONS.merge \
Chris@909 16 :css => :style,
Chris@909 17 :wrap => :div,
Chris@909 18 :line_numbers => false
Chris@909 19
Chris@909 20 end
Chris@909 21
Chris@909 22 end
Chris@909 23 end