Sha256: 380672e783bdf8cdc7efd952198ead9c8da51946a7b1597806b7656d3df555fc

Contents?: true

Size: 1.45 KB

Versions: 1

Compression:

Stored size: 1.45 KB

Contents

#--
#   Copyright (C) 2006  Andrea Censi  <andrea (at) rubyforge.org>
#
# This file is part of Maruku.
# 
#   Maruku is free software; you can redistribute it and/or modify
#   it under the terms of the GNU General Public License as published by
#   the Free Software Foundation; either version 2 of the License, or
#   (at your option) any later version.
# 
#   Maruku is distributed in the hope that it will be useful,
#   but WITHOUT ANY WARRANTY; without even the implied warranty of
#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#   GNU General Public License for more details.
# 
#   You should have received a copy of the GNU General Public License
#   along with Maruku; if not, write to the Free Software
#   Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
#++


module MaRuKu
	
Globals = {
	:unsafe_features => false,
	
	:debug_keep_ials => false,
	
	:maruku_signature => true
}
	
module Defaults
	DEFAULT_CODE_COLOR = '#fef'
	
	# unused
	DefaultAttributes = <<EOF

{header}:      .mrk-header
{paragraph}:   .mrk-par
{strong}:      .mrk-strong 
{emphasis}:    .mrk-em 
{code}:        .mrk-code
{code_block}:  .mrk-code_block

{example}:  pre_filter=""

EOF

end


class MDElement
	def get_boolean_setting(sym)
		if self.doc.attributes.has_key?(sym) then
			return !!self.doc.attributes[sym]
		elsif Globals.has_key?(sym)
			return !!Globals[sym]
		else
			puts "Bug: no default for #{sym.inspect}"
			nil
		end
	end
end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
maruku-0.4.2.1 lib/maruku/defaults.rb