Sha256: 0adc2573c63fd737b1211423c44322e7a25365bdde4f7a41d904a7806ce850cc
Contents?: true
Size: 916 Bytes
Versions: 12
Compression:
Stored size: 916 Bytes
Contents
# -*- encoding : utf-8 -*- # # require "card/content/diff" class Card class Format # Main Format class for formatting card views in HTML class HtmlFormat < Format register :html attr_accessor :options_need_save, :start_time, :skip_autosave def main? !@main.nil? end # is the current card the requested card? def focal? @focal ||= show_layout? ? main? : depth.zero? end def default_nest_view # FIXME: not sure this makes sense as a rule... card.rule(:default_html_view) || :titled end def default_item_view :bar end def escape_literal literal "<span>#{literal}</span>" end def mime_type "text/html" end def final_render_call method rendered = super rendered.is_a?(Array) ? output(rendered) : rendered end end end end
Version data entries
12 entries across 12 versions & 2 rubygems