lib/rabbit/element/preformatted.rb in rabbit-0.9.3 vs lib/rabbit/element/preformatted.rb in rabbit-1.0.0
- old
+ new
@@ -1,12 +1,12 @@
-require 'rabbit/element/text-container-element'
+require 'rabbit/element/text-block-element'
require 'rabbit/element/block-element'
module Rabbit
module Element
class PreformattedBlock
- include TextContainerElement
+ include TextBlockElement
include BlockHorizontalCentering
def text
super.gsub(/^/, " ")
end
@@ -14,10 +14,15 @@
def to_rd
text
end
def to_html(generator)
- "<pre>#{super}</pre>"
+ "<pre#{attributes}>#{super}</pre>"
+ end
+
+ private
+ def attributes
+ ""
end
end
class PreformattedText
include TextContainerElement