Sha256: 0e766e473852b5ed8656ee0a20d3502deae5ffb8ab07f713b34196d3ed24953f

Contents?: true

Size: 467 Bytes

Versions: 24

Compression:

Stored size: 467 Bytes

Contents

require 'maruku'

text = <<EOF
Chapter 1
=========

It was a stormy and rainy night.

EOF

invalid = <<EOF

This is a [bad link.

EOF

Maruku.new(text).to_html

s = ""

begin 
	Maruku.new(invalid, {:on_error => :raise, :error_stream => s})
	puts "Error! It should have thrown an exception."
rescue
	# puts "ok, got error"
end

begin 
	Maruku.new(invalid, {:on_error => :warning, :error_stream => s})
rescue
	puts "Error! It should not have thrown an exception."
end

Version data entries

24 entries across 24 versions & 8 rubygems

Version Path
bai-maruku-0.5.9 lib/maruku/usage/example1.rb
remi-maruku-0.5.9 lib/maruku/usage/example1.rb
maruku-0.6.1 lib/maruku/usage/example1.rb
maiku-0.6.1.maiku lib/maruku/usage/example1.rb
patcito-maruku-0.6.0 lib/maruku/usage/example1.rb
vanity-1.7.1 vendor/ruby/1.9.1/gems/maruku-0.6.0/lib/maruku/usage/example1.rb
amp-front-0.2.0 lib/amp-front/third_party/maruku/usage/example1.rb
amp-front-0.1.0 lib/amp-front/third_party/maruku/usage/example1.rb
amp-0.5.3 lib/amp/dependencies/maruku/usage/example1.rb
maruku-0.4.2.1 lib/maruku/usage/example1.rb
maruku-0.5.2 lib/maruku/usage/example1.rb
maruku-0.4.2 lib/maruku/usage/example1.rb
maruku-0.4.1 lib/maruku/usage/example1.rb
maruku-0.4.0 lib/maruku/usage/example1.rb
maruku-0.5.1 lib/maruku/usage/example1.rb
maruku-0.5.0 lib/maruku/usage/example1.rb
maruku-0.5.3 lib/maruku/usage/example1.rb
maruku-0.5.4 lib/maruku/usage/example1.rb
maruku-0.5.5 lib/maruku/usage/example1.rb
maruku-0.5.6 lib/maruku/usage/example1.rb