REXML is dead. Long live Nokogiri.

Modify Maruku to use Nokogiri instead of REXML.
Produces a 3-fold speedup in the #to_html method.
master
Jacques Distler 2011-08-11 20:36:44 -05:00
parent 46da1f3aaf
commit 13a522525c
369 changed files with 1703 additions and 16342 deletions

View File

@ -555,6 +555,13 @@ END_THM
"<p>A <code>class SmartEngine</code> would not mark up</p>\n<pre>CodeBlocks</pre>\n<p>would it?</p>",
"A <code>class SmartEngine</code> would not mark up\n\n<pre>CodeBlocks</pre>\n\nwould it?")
end
def test_inline_html
set_web_property :markup, :markdownMML
assert_markup_parsed_as(
"<p>We discuss the general abstract <a href='http://nlab.mathforge.org/nlab/show/cohesive+(infinity%2C1)-topos#Structures'>structures in a cohesive (\u221E,1)-topos</a> realized.</p>",
"We discuss the general abstract\n<a href=\"http://nlab.mathforge.org/nlab/show/cohesive+(infinity%2C1)-topos#Structures\">structures in a cohesive (\u221E,1)-topos</a> realized.")
end
# def test_content_with_autolink_in_parentheses
# assert_markup_parsed_as(

View File

@ -1,350 +0,0 @@
#!/usr/bin/env ruby
require 'maruku'
#require 'maruku/textile2'
require 'maruku/input_textile2/t2_parser'
$marutest_language = :markdown
#MARKER = "\n***EOF***\n"
SPLIT = %r{\n\*\*\*[^\*]+\*\*\*\n}m
def marker(x)
"\n*** Output of #{x} ***\n"
end
def write_lines(i, j, lines, prefix, i_star)
i = [i, 0].max
j = [j, lines.size-1].min
for a in i..j
l = lines[a].gsub(/\t/,' ')
puts( ("%s %3d" % [prefix, a]) +
(a==i_star ? " -->" : " ")+lines[a])
end
end
# a = expected b = found
def equals(a, b)
a = a.split("\n")
b = b.split("\n")
for i in 0..([a.size-1,b.size-1].max)
la = a[i]
lb = b[i]
if la != lb
puts "\n"
write_lines(i-3, i+3, a, "expected", i )
write_lines(i-3, i+3, b, " found", i )
return false
end
end
return true
end
TOTEST = [:inspect,:to_html,:to_latex,:to_md,:to_s]
def run_test(filename, its_ok, verbose=true)
# read file content
input = (f=File.open(filename,'r')).read; f.close
output_html = File.join(File.dirname(filename),
File.basename(filename, File.extname(filename)) + ".html")
# split the input in sections
stuff = input.split(SPLIT)
if stuff.size == 1
stuff[2] = stuff[0]
stuff[0] = "Write a comment here"
stuff[1] = "{} # params "
end
comment = stuff.shift
params_s = stuff.shift
params = eval(params_s||'{}')
if params == nil
raise "Null params? #{params_s.inspect}"
end
markdown = stuff.shift
# puts "comment: #{markdown.inspect}"
# puts "markdown: #{markdown.inspect}"
failed = []
relaxed = []
crashed = []
actual = {}
doc =
if $marutest_language == :markdown
Maruku.new(markdown, params)
else
MaRuKu.textile2(markdown, params)
end
for s in TOTEST
begin
if s==:to_html
actual[s] = doc.to_html
else
actual[s] = doc.send s
raise "Methods #{s} gave nil" if not actual[s]
end
rescue Exception => e
crashed << s
actual[s] = e.inspect+ "\n"+ e.backtrace.join("\n")
puts actual[s]
end
end
File.open(output_html, 'w') do |f|
f.write doc.to_html_document
end
begin
m = Maruku.new
d = m.instance_eval(actual[:inspect])
rescue Exception => e
s = e.inspect + e.backtrace.join("\n")
raise "Inspect is not correct:\n ========\n#{actual[:inspect]}"+
"============\n #{s}"
end
expected = {}
if (stuff.size < TOTEST.size)
$stdout.write " (first time!) "
TOTEST.each do |x| expected[x] = actual[x] end
else
TOTEST.each_index do |i|
symbol = TOTEST[i]
expected[symbol] = stuff[i]
# puts "symbol: #{symbol.inspect} = #{stuff[i].inspect}"
end
end
m = Maruku.new
if not its_ok.include? :inspect
begin
d = m.instance_eval(expected[:inspect])
# puts "Eval: #{d.inspect}"
expected[:inspect] = d.inspect
rescue Exception => e
s = e.inspect + e.backtrace.join("\n")
raise "Cannot eval user-provided string:\n #{expected[:inspect].to_s}"+
"\n #{s}"
end
end
# m.instance_eval(actual[:inspect]) != m.instance_eval(expected[:inspect])
# actual[:inspect] = m.instance_eval(actual[:inspect])
# expected[:inspect] = m.instance_eval(expected[:inspect])
TOTEST.each do |x|
expected[x].strip!
actual[x].strip!
if not equals(expected[x], actual[x])
if its_ok.include? x
expected[x] = actual[x]
$stdout.write " relax:#{x} "
relaxed << x
else
actual[x] = "-----| WARNING | -----\n" + actual[x].to_s
failed << x
end
end
end
f = File.open(filename, 'w')
f.write comment
f.write "\n*** Parameters: ***\n"
f.write params_s
f.write "\n*** Markdown input: ***\n"
f.write markdown
TOTEST.each do |x|
f.write marker(x)
f.write expected[x]
end
f.write "\n*** EOF ***\n"
if not failed.empty? or not crashed.empty?
f.puts "\n\n\n\nFailed tests: #{failed.inspect} \n"
TOTEST.each do |x|
f.write marker(x)
f.write actual[x]
end
else
f.puts "\n\n\n\tOK!\n\n\n"
end
md_pl = markdown_pl(markdown)
f.write "\n*** Output of Markdown.pl ***\n"
f.write md_pl
f.write "\n*** Output of Markdown.pl (parsed) ***\n"
begin
doc = REXML::Document.new("<div>#{md_pl}</div>",{
:compress_whitespace=>['div','p'],
:ignore_whitespace_nodes=>['div','p'],
:respect_whitespace=>['pre','code']
})
div = doc.root
xml =""
indent=1
if $rexml_new_version
formatter = if indent > -1
REXML::Formatters::Pretty.new( indent, ie_hack=false )
else
REXML::Formatters::Default.new( ie_hack=false )
end
formatter.write( div, xml)
else
div.write(xml,indent,transitive=true,ie_hack=false)
end
xml.gsub!("\A<div>(.*)</div>\Z", "\1")
f.write xml
rescue Exception=>e
f.puts "Error: #{e.inspect}"
end
f.close
return failed, relaxed, crashed
end
def markdown_pl(markdown)
tmp1 = "/tmp/marutest1"
tmp2 = "/tmp/marutest2"
File.open(tmp1,'w') do |f| f.puts markdown end
system "bin/Markdown.pl < #{tmp1} > #{tmp2}"
f = File.open(tmp2,'r')
s = f.read
f.close
s
end
def passed?(args, arg)
if args.include? arg
args.delete arg
true
else
false
end
end
def marutest(args)
dont_worry = []
TOTEST.each do |x|
arg = "ok:#{x}"
# puts arg
if passed?(args, arg)
dont_worry << x
end
end
if passed?(args, 'ok')
dont_worry = TOTEST.clone
end
if dont_worry.size > 0
puts "Relaxed on #{dont_worry.inspect}"
end
failed = {}
relaxed = {}
args.each do |f|
$stdout.write f + ' '*(50-f.size) + " "
$stdout.flush
tf, tr, tcrashed = run_test(f, dont_worry)
tf = tf + tcrashed
if tr.size > 0
$stdout.write " relax #{tr.inspect} "
end
if tf.size>0
$stdout.write " failed on #{tf.inspect} "
else
$stdout.write " OK "
end
if tcrashed.size > 0
$stdout.write " CRASHED on #{tcrashed.inspect}"
end
$stdout.write "\n"
failed[f] = tf
relaxed[f] = tr
end
num_failed = 0
failed_cat = {}
puts "\n\n\n**** FINAL REPORT ****\n\n"
if failed.size > 0
failed.each do |file, fl|
num_failed += fl.size
if fl.size > 0
puts "\t#{file}\tfailed on #{fl.inspect}"
end
fl.each do |x|
failed_cat[x] = failed_cat[x] || 0
failed_cat[x] = failed_cat[x] + 1
end
end
end
if dont_worry.size > 0
puts "Relaxed on #{dont_worry.inspect}"
end
if relaxed.size > 0
relaxed.each do |file, r|
if r.size > 0
puts "\t#{file}\t\trelaxed on #{r.inspect}"
end
end
end
if failed_cat.size > 0
puts "\nCategories:\n"
failed_cat.each do |x, num|
puts "\t#{x.inspect} \tfailed #{num}/#{args.size}"
end
end
return num_failed == 0
end
if File.basename(__FILE__) == 'marutest'
if ARGV.empty?
puts "marutest is a tool for running Maruku's unittest."
exit 1
end
ok = marutest(ARGV.clone)
exit ok ? 0 : -1
end

View File

@ -2,6 +2,7 @@ require 'tempfile'
require 'fileutils'
require 'digest/md5'
require 'pstore'
require 'nokogiri'
module MaRuKu
module Out
@ -40,16 +41,16 @@ COMMAND
return
end
doc = Document.new(result, :respect_whitespace => :all)
png = doc.root.elements[1]
doc = Nokogiri::XML::Document.parse(result)
png = doc.root.elements.to_a[0]
if png.name != 'png'
maruku_error "Blahtex error: \n#{doc}"
return
end
raise "No depth element in:\n #{doc}" unless depth = png.elements['depth']
raise "No height element in:\n #{doc}" unless height = png.elements['height']
raise "No md5 element in:\n #{doc}" unless md5 = png.elements['md5']
raise "No depth element in:\n #{doc}" unless depth = png.xpath('//depth')[0]
raise "No height element in:\n #{doc}" unless height = png.xpath('//height')[0]
raise "No md5 element in:\n #{doc}" unless md5 = png.xpath('//md5')[0]
depth = depth.text.to_f
height = height.text.to_f # TODO: check != 0

View File

@ -25,9 +25,9 @@ module MaRuKu
maruku_error "Unknown itex2mml kind: #{kind}"
return
end
return Document.new(mathml.to_utf8, :respect_whitespace => :all).root
rescue REXML::ParseException => e
d = Nokogiri::XML::Document.parse(mathml.to_utf8)
return d.root
rescue Exception => e
maruku_error "Invalid MathML TeX: \n#{tex.gsub(/^/, 'tex>')}\n\n #{e.inspect}"
nil
rescue

View File

@ -1,15 +1,14 @@
module MaRuKu; module Out; module HTML
require 'maruku/string_utils'
require 'nokogiri'
def convert_to_mathml_none(kind, tex)
# You can: either return a REXML::Element
# return Element.new 'div'
# You can: either return a nokogiri::XML::Element
# or return an empty array on error
# return []
# or have a string parsed by REXML:
mathml = "<code>#{html_escape(tex)}</code>"
return Document.new(mathml).root
return Nokogiri::XML::Document.parse(mathml).root
end
def convert_to_png_none(kind, tex)

View File

@ -38,12 +38,14 @@ Same thing as `html_math_engine`, only for PNG output.
=end
require 'nokogiri'
module MaRuKu
module Out
module HTML
# Creates an xml Mathml document of this node's TeX code.
#
# @return [REXML::Document]
# @return Nokogiri::XML::Document]
def render_mathml(kind, tex)
engine = get_setting(:html_math_engine)
method = "convert_to_mathml_#{engine}"
@ -77,6 +79,7 @@ module MaRuKu
end
def adjust_png(png, use_depth)
d = Nokogiri::XML::Document.new
src = png.src
height_in_px = png.height
@ -88,22 +91,23 @@ module MaRuKu
style << "vertical-align: -#{depth_in_ex}ex;" if use_depth
style << "height: #{total_height_in_ex}ex;"
img = Element.new 'img'
img.attributes['src'] = src
img.attributes['style'] = style
img.attributes['alt'] = "$#{self.math.strip}$"
img = Nokogiri::XML::Element.new('img', d)
img['src'] = src
img['style'] = style
img['alt'] = "$#{self.math.strip}$"
img
end
def to_html_inline_math
d = Nokogiri::XML::Document.new
mathml = get_setting(:html_math_output_mathml) && render_mathml(:inline, self.math)
png = get_setting(:html_math_output_png) && render_png(:inline, self.math)
span = create_html_element 'span'
add_class_to(span, 'maruku-inline')
span['class'] = 'maruku-inline'
if mathml
add_class_to(mathml, 'maruku-mathml')
mathml['class'] = 'maruku-mathml'
return mathml
end
@ -117,18 +121,19 @@ module MaRuKu
end
def to_html_equation
d = Nokogiri::XML::Document.new
mathml = get_setting(:html_math_output_mathml) && render_mathml(:equation, self.math)
png = get_setting(:html_math_output_png) && render_png(:equation, self.math)
div = create_html_element 'div'
add_class_to(div, 'maruku-equation')
div['class'] = 'maruku-equation'
if mathml
if self.label # then numerate
span = Element.new 'span'
span.attributes['class'] = 'maruku-eq-number'
span << Text.new("(#{self.num})")
span = Nokogiri::XML::Element.new('span', d)
span['class'] = 'maruku-eq-number'
span << Nokogiri::XML::Text.new("(#{self.num})", d)
div << span
div.attributes['id'] = "eq:#{self.label}"
div['id'] = "eq:#{self.label}"
end
add_class_to(mathml, 'maruku-mathml')
div << mathml
@ -139,18 +144,18 @@ module MaRuKu
add_class_to(img, 'maruku-png')
div << img
if self.label # then numerate
span = Element.new 'span'
span.attributes['class'] = 'maruku-eq-number'
span << Text.new("(#{self.num})")
span = Nokogiri::XML::Element.new('span', d)
span['class'] = 'maruku-eq-number'
span << Nokogiri::XML::Text.new("(#{self.num})", d)
div << span
div.attributes['id'] = "eq:#{self.label}"
div['id'] = "eq:#{self.label}"
end
end
source_span = Element.new 'span'
source_span = Nokogiri::XML::Element.new('span', d)
add_class_to(source_span, 'maruku-eq-tex')
code = convert_to_mathml_none(:equation, self.math.strip)
code.attributes['style'] = 'display: none'
code['style'] = 'display: none'
source_span << code
div << source_span
@ -158,29 +163,31 @@ module MaRuKu
end
def to_html_eqref
d = Nokogiri::XML::Document.new
unless eq = self.doc.eqid2eq[self.eqid]
maruku_error "Cannot find equation #{self.eqid.inspect}"
return Text.new("(eq:#{self.eqid})")
return Nokogiri::XML::Text.new("(eq:#{self.eqid})", d)
end
a = Element.new 'a'
a.attributes['class'] = 'maruku-eqref'
a.attributes['href'] = "#eq:#{self.eqid}"
a << Text.new("(#{eq.num})")
a = Nokogiri::XML::Element.new('a', d)
a['class'] = 'maruku-eqref'
a['href'] = "#eq:#{self.eqid}"
a << Nokogiri::XML::Text.new("(#{eq.num})", d)
a
end
def to_html_divref
d = Nokogiri::XML::Document.new
unless hash = self.doc.refid2ref.values.find {|h| h.has_key?(self.refid)}
maruku_error "Cannot find div #{self.refid.inspect}"
return Text.new("\\ref{#{self.refid}}")
return Nokogiri::XML::Text.new("\\ref{#{self.refid}}", d)
end
ref= hash[self.refid]
a = Element.new 'a'
a.attributes['class'] = 'maruku-ref'
a.attributes['href'] = "#" + self.refid
a << Text.new(ref.num.to_s)
a = Nokogiri::XML::Element.new('a', d)
a['class'] = 'maruku-ref'
a['href'] = "#" + self.refid
a << Nokogiri::XML::Text.new(ref.num.to_s, d)
a
end
end

View File

@ -18,6 +18,9 @@
module MaRuKu
require 'nokogiri'
# A collection of helper functions for creating Markdown elements.
# They hide the particular internal representations.
#
@ -80,11 +83,11 @@ module MaRuKu
e = md_el(:raw_html, [], :raw_html => raw_html)
begin
e.instance_variable_set("@parsed_html",
REXML::Document.new("<marukuwrap>#{raw_html.strip}</marukuwrap>"))
rescue REXML::ParseException => ex
Nokogiri::XML::Document.parse("<marukuwrap>#{raw_html.strip}</marukuwrap>"))
rescue Nokogiri::XML::Document.errors => ex
e.instance_variable_set "@parsed_html", nil
maruku_recover <<ERR
REXML cannot parse this block of HTML/XML:
Nokogiri cannot parse this block of HTML/XML:
#{raw_html.gsub(/^/, '|').rstrip}
#{ex.inspect}
ERR

View File

@ -221,12 +221,14 @@ class CharSourceStrscan
def shift_char; @scanner.getch[0]; end
# Advance the pointer
def ignore_char; @scanner.pos= @scanner.pos + 1; end
# def ignore_char; @scanner.pos=(@scanner.pos + 1); end
def ignore_char; @scanner.getch; nil; end
# Advance the pointer by n
def ignore_chars(n); @scanner.pos= @scanner.pos + n; end
# def ignore_chars(n); @scanner.pos=(@scanner.pos + n); end
def ignore_chars(n); n.times{@scanner.getch}; nil; end
# Resturn the rest of the string
# Return the rest of the string
def current_remaining_buffer; @scanner.rest; end
# Returns true if string matches what we're pointing to
@ -237,7 +239,7 @@ class CharSourceStrscan
def read_regexp(r); r.match(@scanner.scan(r)); end
def consume_whitespace; @scanner.skip(/\s*/); end
def consume_whitespace; @scanner.skip(/\s+/); end
def describe
len = 75

View File

@ -23,8 +23,6 @@ module MaRuKu; module In; module Markdown; module SpanLevelParser
# This class helps me read and sanitize HTML blocks
# I tried to do this with REXML, but wasn't able to. (suggestions?)
class HTMLHelper
include MaRuKu::Strings

View File

@ -20,6 +20,7 @@
require 'iconv'
require 'nokogiri'
module MaRuKu; module In; module Markdown; module BlockLevelParser
@ -184,7 +185,6 @@ Disabled by default because of security concerns.
end
end
include REXML
# (PHP Markdown extra) Search for elements that have
# markdown=1 or markdown=block defined
def substitute_markdown_inside_raw_html
@ -195,35 +195,38 @@ Disabled by default because of security concerns.
block_tags = ['div']
# use xpath to find elements with 'markdown' attribute
XPath.match(doc, "//*[attribute::markdown]" ).each do |e|
doc.xpath("//*[attribute::markdown]").each do |e|
# puts "Found #{e}"
# should we parse block-level or span-level?
how = e.attributes['markdown']
how = e['markdown']
parse_blocks = (how == 'block') || block_tags.include?(e.name)
# Select all text elements of e
XPath.match(e, "//text()" ).each { |original_text|
s = original_text.value
e.xpath("//text()").each { |original_text|
s = original_text.text
if s.strip.size > 0
# puts "Parsing #{s.inspect} as blocks: #{parse_blocks} (#{e.name}, #{e.attributes['markdown']}) "
# puts "Parsing #{s.inspect} as blocks: #{parse_blocks} (#{e.name}, #{e['markdown']}) "
el = md_el(:dummy,
parse_blocks ? parse_text_as_markdown(s) :
parse_lines_as_span([s]) )
p = original_text.parent
#Nokogiri collapses consecutive Text nodes, so replace it by a dummy element
guard = Nokogiri::XML::Element.new('guard', doc)
original_text.replace(guard)
el.children_to_html.each do |x|
p.insert_before(original_text, x)
guard.before(x)
end
p.delete(original_text)
guard.remove
end
}
# remove 'markdown' attribute
e.delete_attribute 'markdown'
e.delete('markdown')
end

View File

@ -818,7 +818,7 @@ SpanContext = SpanContext_String # Seems to be faster
s = "Elements read in span: \n" +
lines.gsub(/^/, ' -')+"\n"
s += "Current string: \n #{@cur_string_array.join.inspect}\n" unless @cur_string_array.empty?
s += "Current string: \n #{@cur_string.inspect}\n" unless @cur_string.empty?
s
end
end # SpanContext_String

View File

@ -1,14 +1,8 @@
# This module groups all functions related to HTML export.
module MaRuKu
begin
require 'rexml/formatters/pretty'
require 'rexml/formatters/default'
$rexml_new_version = true
rescue LoadError
$rexml_new_version = false
end
require 'maruku/string_utils'
require 'nokogiri'
require 'maruku/string_utils'
class MDDocument
@ -22,25 +16,30 @@ end
ie_hack = !context[:ie_hack].kind_of?(FalseClass)
content_only = !context[:content_only].kind_of?(FalseClass)
doc = Document.new(nil,{:respect_whitespace =>:all})
doc = Nokogiri::XML::Document.new
if content_only
body = Element.new('div', doc)
body = Nokogiri::XML::Element.new('div', doc)
else
html = Element.new('html', doc)
html.add_namespace('http://www.w3.org/1999/xhtml')
html = Nokogiri::XML::Element.new('html', doc)
doc << html
html.add_namespace(nil, 'http://www.w3.org/1999/xhtml')
html.add_namespace('svg', "http://www.w3.org/2000/svg" )
head = Element.new('head', html)
me = Element.new 'meta', head
me.attributes['http-equiv'] = 'Content-type'
me.attributes['content'] = 'text/html;charset=utf-8'
head = Nokogiri::XML::Element.new('head', html)
html << head
me = Nokogiri::XML::Element.new('meta', head)
me['http-equiv'] = 'Content-type'
me['content'] = 'text/html;charset=utf-8'
head << meta
# Create title element
doc_title = self.attributes[:title] || self.attributes[:subject] || ""
title = Element.new 'title', head
title << Text.new(doc_title)
body = Element.new('body', html)
title = Nokogiri::XML::Element.new 'title', head
title << Nokogiri::XML::Text.new(doc_title, head)
head << title
body = Nokogiri::XML::Element.new('body', html)
html << body
end
@ -68,10 +67,11 @@ end
<div class='bottomright'> #{slide_bottomright}</div>
</div>
"
body.add_element Document.new(dummy_layout_slide, {:respect_whitespace =>:all}).root
body << Nokogiri::XML::Document.parse(dummy_layout_slide).root
presentation = Element.new 'div', body
presentation.attributes['class'] = 'presentation'
presentation = Nokogiri::XML::Element.new('div', body)
presentation['class'] = 'presentation'
body << presentation
first_slide="
<div class='slide'>
@ -81,19 +81,21 @@ end
<h4> #{self.attributes[:company] ||context[:company]}</h4>
</div>
"
presentation.add_element Document.new(first_slide).root
presentation << Nokogiri::XML::Document.parse(first_slide).root
slide_num = 0
self.toc.section_children.each do |slide|
slide_num += 1
@doc.attributes[:doc_prefix] = "s#{slide_num}"
puts "Slide #{slide_num}: " + slide.header_element.to_s
div = Element.new('div', presentation)
div.attributes['class'] = 'slide'
# puts "Slide #{slide_num}: " + slide.header_element.to_s
div = Nokogiri::XML::Element.new('div', presentation)
presentation << div
div['class'] = 'slide'
h1 = Element.new 'h1', div
h1 = Nokogiri::XML::Element.new('h1', div)
slide.header_element.children_to_html.each do |e| h1 << e; end
div << h1
array_to_html(slide.immediate_children).each do |e| div << e end
@ -104,23 +106,15 @@ end
end
end
xml = ""
if (content_only)
if $rexml_new_version
formatter = REXML::Formatters::Default.new(ie_hack)
formatter.write(body, xml)
else
body.write(xml,indent,transitive=true,ie_hack);
end
xml = body.to_xml(:indent => (context[:indent] || 2), :save_with => 2 )
else
doc2 = Document.new("<div>"+S5_external+"</div>",{:respect_whitespace =>:all})
doc2 = Nokogiri::XML::Document.parse("<div>"+S5_external+"</div>")
doc2.root.children.each{ |child| head << child }
add_css_to(head)
# REXML Bug? if indent!=-1 whitespace is not respected for 'pre' elements
# containing code.
html.write(xml,indent,transitive=true,ie_hack);
xml = html.to_xml(:indent => (context[:indent] || 2), :save_with => 2 )
Xhtml11_mathml2_svg11 + xml
end
end

View File

@ -18,63 +18,37 @@
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#++
require 'rexml/document'
begin
require 'rexml/formatters/pretty'
require 'rexml/formatters/default'
$rexml_new_version = true
rescue LoadError
$rexml_new_version = false
end
require 'nokogiri'
require 'maruku/string_utils'
class String
# A string is rendered into HTML by creating
# a REXML::Text node. REXML takes care of all the encoding.
# a Nokogiri::XML::Text node. Nokogiri takes care of all the encoding.
def to_html
REXML::Text.new(self)
d = Nokogiri::XML::Document.new
Nokogiri::XML::Text.new(self, d)
end
end
# This module groups all functions related to HTML export.
module MaRuKu; module Out; module HTML
include REXML
# Render as an HTML fragment (no head, just the content of BODY). (returns a string)
def to_html(context={})
indent = context[:indent] || -1
ie_hack = context[:ie_hack] || true
div = Element.new 'dummy'
def to_html(context={})
d = Nokogiri::XML::Document.parse('<dummy/>')
children_to_html.each do |e|
div << e
d.root << e
end
# render footnotes
if @doc.footnotes_order.size > 0
div << render_footnotes
d.root << render_footnotes
end
doc = Document.new(nil,{:respect_whitespace =>:all})
doc << div
# REXML Bug? if indent!=-1 whitespace is not respected for 'pre' elements
# containing code.
xml =""
xml = d.to_xml(:indent => (context[:indent] || 2), :save_with => 2 )
if $rexml_new_version
formatter = if indent > -1
REXML::Formatters::Pretty.new( indent, ie_hack )
else
REXML::Formatters::Default.new( ie_hack )
end
formatter.write( div, xml)
else
div.write(xml,indent,transitive=true,ie_hack)
end
xml.gsub!(/\A<dummy>\s*|\s*<\/dummy>\Z|\A<dummy\s*\/>/,'')
xml.gsub!(/\A<dummy>\s*|\s*<\/dummy>\s*\Z|\A<dummy\s*\/>/,'')
xml
end
@ -85,9 +59,7 @@ module MaRuKu; module Out; module HTML
doc = to_html_document_tree
xml = ""
# REXML Bug? if indent!=-1 whitespace is not respected for 'pre' elements
# containing code.
doc.write(xml,indent,transitive=true,ie_hack);
xml = doc.to_xml(:indent => (context[:indent] || 2), :save_with => 2 )
Xhtml11_mathml2_svg11 + xml
end
@ -113,7 +85,10 @@ Xhtml11_mathml2_svg11 =
'
def xml_newline() Text.new("\n") end
def xml_newline
d = Nokogiri::XML::Document.new
Nokogiri::XML::Text.new("\n", d)
end
=begin maruku_doc
@ -155,10 +130,11 @@ Synonim for `title`.
=end
# Render to an HTML fragment (returns a REXML document tree)
# Render to an HTML fragment (returns a Nokogiri document tree)
def to_html_tree
div = Element.new 'div'
div.attributes['class'] = 'maruku_wrapper_div'
d = Nokogiri::XML::Document.new
div = Nokogiri::XML::Element.new('dummy', d)
div['class'] = 'maruku_wrapper_div'
children_to_html.each do |e|
div << e
end
@ -168,8 +144,7 @@ Synonim for `title`.
div << render_footnotes
end
doc = Document.new(nil,{:respect_whitespace =>:all})
doc << div
d << div
end
=begin maruku_doc
@ -188,56 +163,59 @@ Example:
METAS = %w{description keywords author revised}
# Render to a complete HTML document (returns a REXML document tree)
# Render to a complete HTML document (returns a Nokogiri document tree)
def to_html_document_tree
doc = Document.new(nil,{:respect_whitespace =>:all})
# doc << XMLDecl.new
doc = Nokogiri::XML::Document.new
root = Element.new('html', doc)
root.add_namespace('http://www.w3.org/1999/xhtml')
root = Nokogiri::XML::Element.new('html', doc)
root.add_namespace(nil, 'http://www.w3.org/1999/xhtml')
root.add_namespace('svg', "http://www.w3.org/2000/svg" )
lang = self.attributes[:lang] || 'en'
root.attributes['xml:lang'] = lang
lang = self[:lang] || 'en'
root['xml:lang'] = lang
doc << root
root << xml_newline
head = Element.new 'head', root
head = Nokogiri::XML::Element.new('head', doc)
root << head
#<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8">
me = Element.new 'meta', head
me.attributes['http-equiv'] = 'Content-type'
# me.attributes['content'] = 'text/html;charset=utf-8'
me.attributes['content'] = 'application/xhtml+xml;charset=utf-8'
me = Nokogiri::XML::Element.new('meta', doc)
me['http-equiv'] = 'Content-type'
me['content'] = 'application/xhtml+xml;charset=utf-8'
head << me
METAS.each do |m|
if value = self.attributes[m.to_sym]
meta = Element.new 'meta', head
meta.attributes['name'] = m
meta.attributes['content'] = value.to_s
meta = Nokogiri::XML::Element.new('meta', doc)
meta['name'] = m
meta['content'] = value.to_s
head << meta
end
end
self.attributes.each do |k,v|
if k.to_s =~ /\Ameta-(.*)\Z/
meta = Element.new 'meta', head
meta.attributes['name'] = $1
meta.attributes['content'] = v.to_s
meta = Nokogiri::XML::Element.new('meta',doc)
meta['name'] = $1
meta['content'] = v.to_s
head << meta
end
end
# Create title element
doc_title = self.attributes[:title] || self.attributes[:subject] || ""
title = Element.new 'title', head
title << Text.new(doc_title)
doc_title = self[:title] || self[:subject] || ""
title = Nokogiri::XML::Element.new('title', doc)
title << Nokogiri::XML::Text.new(doc_title, doc)
head << title
add_css_to(head)
root << xml_newline
body = Element.new 'body'
body = Nokogiri::XML::Element.new('body', doc)
children_to_html.each do |e|
body << e
@ -245,7 +223,7 @@ Example:
# render footnotes
if @doc.footnotes_order.size > 0
body << render_footnotes
body << render_footnotes(@doc)
end
# When we are rendering a whole document, we add a signature
@ -255,18 +233,18 @@ Example:
end
root << body
doc
end
def add_css_to(head)
if css_list = self.attributes[:css]
d = Nokogiri::XML::Document.new
css_list.split.each do |css|
# <link type="text/css" rel="stylesheet" href="..." />
link = Element.new 'link'
link.attributes['type'] = 'text/css'
link.attributes['rel'] = 'stylesheet'
link.attributes['href'] = css
link = Nokogiri::XML::Element.new('link', d)
link['type'] = 'text/css'
link['rel'] = 'stylesheet'
link['href'] = css
head << link
head << xml_newline
end
@ -296,50 +274,52 @@ Example:
t.strftime(", %Y")
end
def maruku_html_signature
div = Element.new 'div'
div.attributes['class'] = 'maruku_signature'
Element.new 'hr', div
span = Element.new 'span', div
span.attributes['style'] = 'font-size: small; font-style: italic'
span << Text.new('Created by ')
a = Element.new('a', span)
a.attributes['href'] = 'http://maruku.rubyforge.org'
a.attributes['title'] = 'Maruku: a Markdown-superset interpreter for Ruby'
a << Text.new('Maruku')
span << Text.new(nice_date+".")
def maruku_html_signature
d = Nokogiri::XML::Document.new
div = Nokogiri::XML::Element.new( 'div', d)
div['class'] = 'maruku_signature'
div << Nokogiri::XML::Element.new('hr', div)
span = Nokogiri::XML::Element.new('span', div)
span['style'] = 'font-size: small; font-style: italic'
div << span << Nokogiri::XML::Text.new('Created by ', div)
a = Nokogiri::XML::Element.new('a', span)
a['href'] = 'http://maruku.rubyforge.org'
a['title'] = 'Maruku: a Markdown-superset interpreter for Ruby'
a << Nokogiri::XML::Text.new('Maruku', div)
span << Nokogiri::XML::Text.new(nice_date+".", div)
div
end
def render_footnotes()
div = Element.new 'div'
div.attributes['class'] = 'footnotes'
div << Element.new('hr')
ol = Element.new 'ol'
def render_footnotes
d = Nokogiri::XML::Document.new
div = Nokogiri::XML::Element.new('div', d)
div['class'] = 'footnotes'
div << Nokogiri::XML::Element.new('hr', d)
ol = Nokogiri::XML::Element.new('ol', d)
@doc.footnotes_order.each_with_index do |fid, i| num = i+1
f = self.footnotes[fid]
if f
li = f.wrap_as_element('li')
li.attributes['id'] = "#{get_setting(:doc_prefix)}fn:#{num}"
li['id'] = "#{get_setting(:doc_prefix)}fn:#{num}"
a = Element.new 'a'
a.attributes['href'] = "\##{get_setting(:doc_prefix)}fnref:#{num}"
a.attributes['rev'] = 'footnote'
a<< Text.new('&#8617;', true, nil, true)
a = Nokogiri::XML::Element.new('a', d)
a['href'] = "\##{get_setting(:doc_prefix)}fnref:#{num}"
a['rev'] = 'footnote'
a << Nokogiri::XML::EntityReference.new(d, '#8617')
last = nil
li.children.reverse_each do |child|
if child.node_type != :text
unless child.text?
last = child
break
end
end
if last and last.name == "p"
last.add_text(' ');
last.add(a);
last << Nokogiri::XML::Text.new(' ', last);
last << a;
else
li.insert_after(li.children.last, a)
li.children.last.add_next_sibling(a)
end
ol << li
else
@ -352,8 +332,8 @@ Example:
end
def to_html_hrule; create_html_element 'hr' end
def to_html_linebreak; Element.new 'br' end
def to_html_hrule; create_html_element 'hr'; end
def to_html_linebreak; create_html_element 'br'; end
# renders children as html and wraps into an element of given name
#
@ -362,8 +342,6 @@ Example:
m = create_html_element(name, attributes_to_copy)
children_to_html.each do |e| m << e; end
# m << Comment.new( "{"+self.al.to_md+"}") if not self.al.empty?
# m << Comment.new( @attributes.inspect) if not @attributes.empty?
m
end
@ -437,11 +415,12 @@ It is copied as a standard HTML attribute.
def create_html_element(name, attributes_to_copy=[])
m = Element.new name
d = Nokogiri::XML::Document.new
m = Nokogiri::XML::Element.new(name, d)
if atts = HTML4Attributes[name] then
atts.each do |att|
if v = @attributes[att] then
m.attributes[att.to_s] = v.to_s
m[att.to_s] = v.to_s
end
end
else
@ -495,11 +474,12 @@ by Maruku, to have the same results in both HTML and LaTeX.
# nil if not applicable, else SPAN element
def render_section_number
d = Nokogiri::XML::Document.new
# if we are bound to a section, add section number
if num = section_number
span = Element.new 'span'
span.attributes['class'] = 'maruku_section_number'
span << Text.new(section_number)
span = Nokogiri::XML::Element.new('span', d)
span['class'] = 'maruku_section_number'
span << Nokogiri::XML::Text.new(section_number, d)
span
else
nil
@ -517,10 +497,8 @@ by Maruku, to have the same results in both HTML and LaTeX.
end
def source2html(source)
# source = source.gsub(/&/,'&amp;')
source = Text.normalize(source)
source.gsub!(/\&apos;|'/,'&#39;') # IE bug
Text.new(source, true, nil, true )
d = Nokogiri::XML::Document.new
t = Nokogiri::XML::Text.new(source,d)
end
=begin maruku_doc
@ -566,7 +544,7 @@ and
lang = 'css21' if lang == 'css'
use_syntax = get_setting :html_use_syntax
element =
if use_syntax && lang
begin
@ -582,15 +560,17 @@ and
source = source.gsub(/\n*\Z/,'')
html = convertor.convert( source )
html.gsub!(/\&apos;|'/,'&#39;') # IE bug
# html = html.gsub(/&/,'&amp;')
code = Document.new(html, {:respect_whitespace =>:all}).root
dd = Nokogiri::XML::Document.new
d = Nokogiri::XML::Document.parse(html)
code = d.root
code.name = 'code'
code.attributes['lang'] = lang
code['lang'] = lang
pre = Element.new 'pre'
pre.attributes['class'] = lang
pre = Nokogiri::XML::Element.new('pre', dd)
pre['class'] = lang
pre << code
pre
rescue LoadError => e
@ -612,7 +592,7 @@ and
color = get_setting(:code_background_color)
if color != Globals[:code_background_color]
element.attributes['style'] = "background-color: #{color};"
element['style'] = "background-color: #{color};"
end
add_ws element
end
@ -638,12 +618,10 @@ of the form `#ff00ff`.
def to_html_code_using_pre(source)
d = Nokogiri::XML::Document.new
pre = create_html_element 'pre'
code = Element.new 'code', pre
code = Nokogiri::XML::Element.new('code', d)
s = source
# s = s.gsub(/&/,'&amp;')
s = Text.normalize(s).gsub(/\&apos;|'/,'&#39;') # IE bug
if get_setting(:code_show_spaces)
# 187 = raquo
@ -653,13 +631,13 @@ of the form `#ff00ff`.
s.gsub!(/ /,'&#172;')
end
text = Text.new(s, respect_ws=true, parent=nil, raw=true )
text = Nokogiri::XML::Text.new(s, d)
if lang = self.attributes[:lang]
code.attributes['lang'] = lang
code.attributes['class'] = lang
code['lang'] = lang
code['class'] = lang
end
code << text
pre << code << text
pre
end
@ -670,15 +648,15 @@ of the form `#ff00ff`.
color = get_setting(:code_background_color)
if color != Globals[:code_background_color]
pre.attributes['style'] = "background-color: #{color};"+(pre.attributes['style']||"")
pre['style'] = "background-color: #{color};"+(pre['style']||"")
end
pre
end
def add_class_to(el, cl)
el.attributes['class'] =
if already = el.attributes['class']
el['class'] =
if already = el['class']
already + " " + cl
else
cl
@ -704,11 +682,12 @@ of the form `#ff00ff`.
def to_html_immediate_link
d = Nokogiri::XML::Document.new
a = create_html_element 'a'
url = self.url
text = url.gsub(/^mailto:/,'') # don't show mailto
a << Text.new(text)
a.attributes['href'] = url
a << Nokogiri::XML::Text.new(text, d)
a['href'] = url
add_class_to_link(a)
a
end
@ -720,8 +699,8 @@ of the form `#ff00ff`.
if ref = @doc.refs[id]
url = ref[:url]
title = ref[:title]
a.attributes['href'] = url if url
a.attributes['title'] = title if title
a['href'] = url if url
a['title'] = title if title
else
maruku_error "Could not find ref_id = #{id.inspect} for #{self.inspect}\n"+
"Available refs are #{@doc.refs.keys.inspect}"
@ -737,8 +716,8 @@ of the form `#ff00ff`.
if url = self.url
title = self.title
a = wrap_as_element 'a'
a.attributes['href'] = url
a.attributes['title'] = title if title
a['href'] = url
a['title'] = title if title
return a
else
maruku_error"Could not find url in #{self.inspect}"
@ -748,7 +727,8 @@ of the form `#ff00ff`.
end
def add_ws(e)
[Text.new("\n"), e, Text.new("\n")]
d = Nokogiri::XML::Document.new
[Nokogiri::XML::Text.new("\n", d), e, Nokogiri::XML::Text.new("\n", d)]
end
##### Email address
@ -761,6 +741,7 @@ of the form `#ff00ff`.
end
def to_html_email_address
d = Nokogiri::XML::Document.new
email = self.email
a = create_html_element 'a'
#a.attributes['href'] = Text.new("mailto:"+obfuscate(email),false,nil,true)
@ -769,7 +750,7 @@ of the form `#ff00ff`.
# Sorry, for the moment it doesn't work
a.attributes['href'] = "mailto:#{email}"
a << Text.new(obfuscate(email),false,nil,true)
a << Nokogiri::XML::Text.new(obfuscate(email), d)
a
end
@ -781,8 +762,8 @@ of the form `#ff00ff`.
if ref = @doc.refs[id]
url = ref[:url]
title = ref[:title]
a.attributes['src'] = url.to_s
a.attributes['alt'] = children_to_s
a['src'] = url.to_s
a['alt'] = children_to_s
else
maruku_error"Could not find id = #{id.inspect} for\n #{self.inspect}"
tell_user "Could not create image with ref_id = #{id.inspect};"+
@ -801,8 +782,8 @@ of the form `#ff00ff`.
end
title = self.title
a = create_html_element 'img'
a.attributes['src'] = url.to_s
a.attributes['alt'] = children_to_s
a['src'] = url.to_s
a['alt'] = children_to_s
return a
end
@ -815,6 +796,7 @@ If true, raw HTML is discarded from the output.
=end
def to_html_raw_html
d = Nokogiri::XML::Document.new
return [] if get_setting(:filter_html)
raw_html = self.raw_html
@ -825,34 +807,35 @@ If true, raw HTML is discarded from the output.
"Raw HTML:\n#{raw_html.inspect}"
maruku_error s
tell_user 'The REXML version you have has a bug, omitting HTML'
div = Element.new 'div'
div = Nokogiri::XML::Element.new('div', d)
#div << Text.new(s)
return div
end
# copies the @children array (FIXME is it deep?)
elements = root.to_a
return elements
elements = root.children.to_a
else # invalid
# Creates red box with offending HTML
tell_user "Wrapping bad html in a PRE with class 'markdown-html-error'\n"+
raw_html.gsub(/^/, '|')
pre = Element.new('pre')
pre.attributes['style'] = 'border: solid 3px red; background-color: pink'
pre.attributes['class'] = 'markdown-html-error'
pre << Text.new("REXML could not parse this XML/HTML: \n#{raw_html}", true)
pre = Nokogiri::XML::Element.new('pre', d)
pre['style'] = 'border: solid 3px red; background-color: pink'
pre['class'] = 'markdown-html-error'
pre << Nokogiri::XML::Text.new("Nokogiri could not parse this XML/HTML: \n#{raw_html}", d)
return pre
end
end
def to_html_abbr
abbr = Element.new 'abbr'
abbr << Text.new(children[0])
abbr.attributes['title'] = self.title if self.title
d = Nokogiri::XML::Document.new
abbr = Nokogiri::XML::Element.new('abbr', d)
abbr << Nokogiri::XML::Text.new(children[0], d)
abbr['title'] = self.title if self.title
abbr
end
def to_html_footnote_reference
d = Nokogiri::XML::Document.new
id = self.footnote_id
# save the order of used footnotes
@ -873,12 +856,12 @@ If true, raw HTML is discarded from the output.
#num = order.size;
num = order.index(id) + 1
sup = Element.new 'sup'
sup.attributes['id'] = "#{get_setting(:doc_prefix)}fnref:#{num}"
a = Element.new 'a'
a << Text.new(num.to_s)
a.attributes['href'] = "\##{get_setting(:doc_prefix)}fn:#{num}"
a.attributes['rel'] = 'footnote'
sup = Nokogiri::XML::Element.new('sup', d)
sup['id'] = "#{get_setting(:doc_prefix)}fnref:#{num}"
a = Nokogiri::XML::Element.new('a', d)
a << Nokogiri::XML::Text.new(num.to_s, d)
a['href'] = "\##{get_setting(:doc_prefix)}fn:#{num}"
a['rel'] = 'footnote'
sup << a
sup
@ -904,21 +887,21 @@ If true, raw HTML is discarded from the output.
end
table = create_html_element 'table'
thead = Element.new 'thead'
tr = Element.new 'tr'
thead = Nokogiri::XML::Element.new('thead', table)
tr = Nokogiri::XML::Element.new('tr', table)
array_to_html(head).each do |x| tr<<x end
thead << tr
table << thead
tbody = Element.new 'tbody'
tbody = Nokogiri::XML::Element.new('tbody', table)
rows.each do |row|
tr = Element.new 'tr'
tr = Nokogiri::XML::Element.new('tr', table)
array_to_html(row).each_with_index do |x,i|
x.attributes['style'] ="text-align: #{align[i].to_s};"
x['style'] ="text-align: #{align[i].to_s};"
tr<<x
end
tbody << tr << Text.new("\n")
tbody << tr << Nokogiri::XML::Text.new("\n", table)
end
table << tbody
table
@ -934,6 +917,7 @@ If true, raw HTML is discarded from the output.
end
def to_html_entity
d = Nokogiri::XML::Document.new
MaRuKu::Out::Latex.need_entity_table
entity_name = self.entity_name
@ -949,17 +933,17 @@ If true, raw HTML is discarded from the output.
if entity_name.kind_of? Fixnum
# Entity.new(entity_name)
Text.new('&#%d;' % [entity_name], false, nil, true)
Nokogiri::XML::EntityReference.new(d, '#%d' % [entity_name])
else
Text.new('&%s;' % [entity_name], false, nil, true)
Nokogiri::XML::EntityReference.new(d, '%s' % [entity_name])
end
end
def to_html_xml_instr
target = self.target || ''
code = self.code || ''
REXML::Instruction.new(target, code)
d = Nokogiri::XML::Document.new
Nokogiri::XML::ProcessingInstruction.new(d,target,code)
end
# Convert each child to html
@ -970,8 +954,7 @@ If true, raw HTML is discarded from the output.
def array_to_html(array)
e = []
array.each do |c|
method = c.kind_of?(MDElement) ?
"to_html_#{c.node_type}" : "to_html"
method = c.kind_of?(MDElement) ? "to_html_#{c.node_type}" : "to_html"
if not c.respond_to?(method)
#raise "Object does not answer to #{method}: #{c.class} #{c.inspect}"

View File

@ -19,12 +19,10 @@
#++
require 'rexml/document'
require 'nokogiri'
module MaRuKu; module Out; module Latex
include REXML
def to_latex_entity
MaRuKu::Out::Latex.need_entity_table
@ -69,13 +67,13 @@ module MaRuKu; module Out; module Latex
def Latex.init_entity_table
# $stderr.write "Creating entity table.."
# $stderr.flush
doc = Document.new(File.read(File.dirname(__FILE__) + "/../../../data/entities.xml"))
doc.elements.each("//char") do |c|
num = c.attributes['num'].to_i
name = c.attributes['name']
package = c.attributes['package']
doc = Nokogiri::XML::Document.parse(File.read(File.dirname(__FILE__) + "/../../../data/entities.xml"))
doc.xpath("//char").each do |c|
num = c['num'].to_i
name = c['name']
package = c['package']
convert = c.attributes['convertTo']
convert = c['convertTo']
convert.gsub!(/@DOUBLEQUOT/,'"')
convert.gsub!(/@QUOT/,"'")
convert.gsub!(/@GT/,">")

View File

@ -16,6 +16,7 @@
# along with Maruku; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
require 'nokogiri'
module MaRuKu
# A section in the table of contents of a document.
@ -87,14 +88,14 @@ module MaRuKu
end
end
include REXML
# Returns an HTML representation of the table of contents.
#
# This should only be called on the root section.
def to_html
div = Element.new 'div'
div.attributes['class'] = 'maruku_toc'
d = Nokogiri::XML::Document.new
div = Nokogiri::XML::Element.new('div', d)
div['class'] = 'maruku_toc'
div << _to_html
div
end
@ -109,18 +110,19 @@ module MaRuKu
protected
def _to_html
ul = Element.new 'ul'
d = Nokogiri::XML::Document.new
ul = Nokogiri::XML::Element.new('ul', d)
# let's remove the bullets
ul.attributes['style'] = 'list-style: none;'
ul['style'] = 'list-style: none;'
@section_children.each do |c|
li = Element.new 'li'
li = Nokogiri::XML::Element.new('li', d)
if span = c.header_element.render_section_number
li << span
end
a = c.header_element.wrap_as_element('a')
a.delete_attribute 'id'
a.attributes['href'] = "##{c.header_element.attributes[:id]}"
a.delete('id')
a['href'] = "##{c.header_element.attributes[:id]}"
li << a
li << c._to_html if c.section_children.size > 0

3
vendor/plugins/maruku/miscs/bug.rb vendored Normal file
View File

@ -0,0 +1,3 @@
puts [].each do end # ok (equiv. to "puts nil")
[1].each do end # ok
puts [1].each do end # 3:in `each': no block given (LocalJumpError)

29
vendor/plugins/maruku/miscs/test.rb vendored Normal file
View File

@ -0,0 +1,29 @@
n=100
$buffer = "blah "*n+"boh"+"beh"*n
$index = n*5
def fun1(reg)
r2 = /^.{#{$index}}#{reg}/
r2.match($buffer)
end
def fun2(reg)
reg.match($buffer[$index, $buffer.size-$index])
end
r = /\w*/
a = Time.now
1000.times do
fun1(r)
end
b = Time.now
1000.times do
fun2(r)
end
c = Time.now
puts "fun1: #{b-a} sec"
puts "fun2: #{c-b} sec"

View File

@ -32,7 +32,7 @@ md_el(:document,[
md_el(:abbr_def,[],{:abbr=>"Tigra Genesis",:text=>nil},[])
],{},[])
*** Output of to_html ***
<p>The <abbr title='Hyper Text Markup Language'>HTML</abbr> specification is maintained by the <abbr title='World Wide Web Consortium'>W3C</abbr>.</p>
<p>The <abbr title="Hyper Text Markup Language">HTML</abbr> specification is maintained by the <abbr title="World Wide Web Consortium">W3C</abbr>.</p>
<p>Operation <abbr>Tigra Genesis</abbr> is going well.</p>
*** Output of to_latex ***
@ -50,15 +50,3 @@ Operation Tigra Genesisis going well.
*[Tigra Genesis]:
*** Output of to_s ***
The HTML specification is maintained by the W3C.Operation Tigra Genesis is going well.
*** EOF ***
OK!
*** Output of Markdown.pl ***
(not used anymore)
*** Output of Markdown.pl (parsed) ***
(not used anymore)

View File

@ -8,22 +8,10 @@ Write a comment here
*** Output of inspect ***
md_el(:document,[md_par([md_im_image(["bar"], "/foo.jpg", nil)])],{},[])
*** Output of to_html ***
<p><img src='/foo.jpg' alt='bar' /></p>
<p><img src="/foo.jpg" alt="bar"/></p>
*** Output of to_latex ***
*** Output of to_md ***
bar
*** Output of to_s ***
bar
*** EOF ***
OK!
*** Output of Markdown.pl ***
(not used anymore)
*** Output of Markdown.pl (parsed) ***
(not used anymore)

View File

@ -18,15 +18,3 @@ md_el(:document,[
*** Output of to_s ***
*** EOF ***
OK!
*** Output of Markdown.pl ***
(not used anymore)
*** Output of Markdown.pl (parsed) ***
(not used anymore)

View File

@ -13,9 +13,9 @@ md_el(:document,[
md_par(["Paragraph2"], [[:id, "par2"]])
],{},[])
*** Output of to_html ***
<p id='par1'>Paragraph1</p>
<p id="par1">Paragraph1</p>
<p id='par2'>Paragraph2</p>
<p id="par2">Paragraph2</p>
*** Output of to_latex ***
Paragraph1
@ -26,15 +26,3 @@ Paragraph1
Paragraph2
*** Output of to_s ***
Paragraph1Paragraph2
*** EOF ***
OK!
*** Output of Markdown.pl ***
(not used anymore)
*** Output of Markdown.pl (parsed) ***
(not used anymore)

View File

@ -30,21 +30,21 @@ md_el(:document,[
md_el(:ald,[],{:ald=>[[:class, "chello"]],:ald_id=>"hello"},[])
],{},[])
*** Output of to_html ***
<h2 id='header1'>Header with attributes</h2>
<h2 id="header1">Header with attributes</h2>
<h3 id='header2'>Header with attributes</h3>
<h3 id="header2">Header with attributes</h3>
<h3 id='header_no_attributes'>Header no attributes</h3>
<h3 id="header_no_attributes_3">Header no attributes</h3>
<p id='par1'>Paragraph with a.</p>
<p id="par1">Paragraph with a.</p>
<p id='par2'>Paragraph with <em class='chello'>emphasis</em></p>
<p id="par2">Paragraph with <em class="chello">emphasis</em></p>
*** Output of to_latex ***
\hypertarget{header1}{}\subsection*{{Header with attributes}}\label{header1}
\hypertarget{header2}{}\subsubsection*{{Header with attributes}}\label{header2}
\hypertarget{header_no_attributes}{}\subsubsection*{{Header no attributes}}\label{header_no_attributes}
\hypertarget{header_no_attributes_3}{}\subsubsection*{{Header no attributes}}\label{header_no_attributes_3}
Paragraph with a.
@ -55,15 +55,3 @@ Header with attributesHeader with attributesHeader no attributesParagraph with a
Paragraph with emphasis
*** Output of to_s ***
Header with attributesHeader with attributesHeader no attributesParagraph with a.Paragraph with emphasis
*** EOF ***
OK!
*** Output of Markdown.pl ***
(not used anymore)
*** Output of Markdown.pl (parsed) ***
(not used anymore)

View File

@ -24,15 +24,3 @@ Paragraph
Paragraph
*** Output of to_s ***
Paragraph
*** EOF ***
OK!
*** Output of Markdown.pl ***
(not used anymore)
*** Output of Markdown.pl (parsed) ***
(not used anymore)

View File

@ -13,22 +13,10 @@ md_el(:document,[
md_el(:ald,[],{:ald=>[[:class, "maruku-par"]],:ald_id=>"paragraph"},[])
],{},[])
*** Output of to_html ***
<p class='maruku-par' id='2'>Paragraph2</p>
<p id="2" class="maruku-par">Paragraph2</p>
*** Output of to_latex ***
Paragraph2
*** Output of to_md ***
Paragraph2
*** Output of to_s ***
Paragraph2
*** EOF ***
OK!
*** Output of Markdown.pl ***
(not used anymore)
*** Output of Markdown.pl (parsed) ***
(not used anymore)

View File

@ -22,15 +22,3 @@ Linea 1
Linea 2
*** Output of to_s ***
Linea 1Linea 2
*** EOF ***
OK!
*** Output of Markdown.pl ***
(not used anymore)
*** Output of Markdown.pl (parsed) ***
(not used anymore)

View File

@ -73,15 +73,3 @@ This block is composed of 5
This block is composed of 2
*** Output of to_s ***
This block is composed of three lines:This block is composed of 5This block is composed of 2
*** EOF ***
OK!
*** Output of Markdown.pl ***
(not used anymore)
*** Output of Markdown.pl (parsed) ***
(not used anymore)

View File

@ -14,15 +14,3 @@ test:
test:
*** Output of to_s ***
test:
*** EOF ***
OK!
*** Output of Markdown.pl ***
(not used anymore)
*** Output of Markdown.pl (parsed) ***
(not used anymore)

View File

@ -27,8 +27,8 @@ md_el(:document,[
md_el(:ald,[],{:ald=>[["scope", "row"]],:ald_id=>"t"},[])
],{},[])
*** Output of to_html ***
<p class='class1' style='color:red'>hello</p>
<table class='class1' summary='Table summary' style='color:red'><thead><tr><th>h</th><th>h</th></tr></thead><tbody><tr><th scope='row' style='text-align: left;'> c1</th><td style='text-align: left;'>c2</td>
<p class="class1" style="color:red">hello</p>
<table class="class1" style="color:red" summary="Table summary"><thead><tr><th>h</th><th>h</th></tr></thead><tbody><tr><th scope="row" style="text-align: left;"> c1</th><td style="text-align: left;">c2</td>
</tr></tbody></table>
*** Output of to_latex ***
hello
@ -44,15 +44,3 @@ hello
hh c1c2
*** Output of to_s ***
hellohh c1c2
*** EOF ***
OK!
*** Output of Markdown.pl ***
(not used anymore)
*** Output of Markdown.pl (parsed) ***
(not used anymore)

View File

@ -17,7 +17,7 @@ md_el(:document,[
*** Output of to_html ***
<p>Here is an example of AppleScript:</p>
<pre><code>tell application &quot;Foo&quot;
<pre><code>tell application "Foo"
beep
end tell
tab</code></pre>
@ -32,15 +32,3 @@ end tell
Here is an example of AppleScript:
*** Output of to_s ***
Here is an example of AppleScript:
*** EOF ***
OK!
*** Output of Markdown.pl ***
(not used anymore)
*** Output of Markdown.pl (parsed) ***
(not used anymore)

View File

@ -26,15 +26,3 @@ Code
Code
*** Output of to_s ***
Code
*** EOF ***
OK!
*** Output of Markdown.pl ***
(not used anymore)
*** Output of Markdown.pl (parsed) ***
(not used anymore)

View File

@ -69,15 +69,3 @@ This is code (1 tab):
This is not code
*** Output of to_s ***
This is code (4 spaces):This is not codeThis is code (1 tab):This is not code
*** EOF ***
OK!
*** Output of Markdown.pl ***
(not used anymore)
*** Output of Markdown.pl (parsed) ***
(not used anymore)

View File

@ -23,15 +23,3 @@ md_el(:document,[
1. abcd efgh ijkl
*** Output of to_s ***
abcd efgh ijkl
*** EOF ***
OK!
*** Output of Markdown.pl ***
(not used anymore)
*** Output of Markdown.pl (parsed) ***
(not used anymore)

View File

@ -165,15 +165,3 @@ text
text
*** Output of to_s ***
texttexttexttexttexttexttexttexttexttexttexttext
*** EOF ***
OK!
*** Output of Markdown.pl ***
(not used anymore)
*** Output of Markdown.pl (parsed) ***
(not used anymore)

View File

@ -19,15 +19,3 @@ ciao
ciao
*** Output of to_s ***
ciao
*** EOF ***
OK!
*** Output of Markdown.pl ***
(not used anymore)
*** Output of Markdown.pl (parsed) ***
(not used anymore)

View File

@ -20,12 +20,12 @@ md_el(:document,[
],{:label=>nil,:num=>nil,:type=>nil},[[:class, "warning"]])
],{},[])
*** Output of to_html ***
<div class='warning'>
<div class="warning">
<p>this is the last warning!</p>
<p>please, go away!</p>
<div class='menace'>
<div class="menace">
<p>or else terrible things will happen</p>
</div>
</div>
@ -43,15 +43,3 @@ please, go away!
or else terrible things will happen
*** Output of to_s ***
this is the last warning!please, go away!or else terrible things will happen
*** EOF ***
OK!
*** Output of Markdown.pl ***
(not used anymore)
*** Output of Markdown.pl (parsed) ***
(not used anymore)

View File

@ -13,15 +13,3 @@ md_el(:document,[md_par([md_em(["Hello!"]), " how are ", md_strong(["you"]), "?"
Hello!how are you?
*** Output of to_s ***
Hello! how are you?
*** EOF ***
OK!
*** Output of Markdown.pl ***
(not used anymore)
*** Output of Markdown.pl (parsed) ***
(not used anymore)

View File

@ -18,15 +18,3 @@ This is an email address: \href{mailto:andrea@invalid.it}{andrea\char64invalid\c
This is an email address:
*** Output of to_s ***
This is an email address:
*** EOF ***
OK!
*** Output of Markdown.pl ***
(not used anymore)
*** Output of Markdown.pl (parsed) ***
(not used anymore)

View File

@ -13,23 +13,10 @@ md_el(:document,[
])
],{},[])
*** Output of to_html ***
<p>This is iso-8859-1: àèìàù.</p>
<p>This is iso-8859-1: &#xC3;&#xA0;&#xC3;&#xA8;&#xC3;&#xAC;&#xC3;&#xA0;&#xC3;&#xB9;.</p>
*** Output of to_latex ***
This is iso-8859-1: àèìàù.
*** Output of to_md ***
This is iso-8859-1:
àèìàù.
This is iso-8859-1: àèìàù.
*** Output of to_s ***
This is iso-8859-1: àèìàù.
*** EOF ***
OK!
*** Output of Markdown.pl ***
(not used anymore)
*** Output of Markdown.pl (parsed) ***
(not used anymore)

View File

@ -9,22 +9,10 @@ Japanese: マルク
*** Output of inspect ***
md_el(:document,[md_par(["Japanese: \343\203\236\343\203\253\343\202\257"])],{},[])
*** Output of to_html ***
<p>Japanese: マルク</p>
<p>Japanese: &#x30DE;&#x30EB;&#x30AF;</p>
*** Output of to_latex ***
Japanese: マルク
*** Output of to_md ***
Japanese: マルク
*** Output of to_s ***
Japanese: マルク
*** EOF ***
OK!
*** Output of Markdown.pl ***
(not used anymore)
*** Output of Markdown.pl (parsed) ***
(not used anymore)

View File

@ -48,11 +48,11 @@ md_el(:document,[
],{},[])
*** Output of to_html ***
<p>Maruku translates HTML entities to the equivalent in LaTeX:</p>
<table><thead><tr><th>Entity</th><th>Result</th></tr></thead><tbody><tr><td style='text-align: left;'><code>&amp;copy;</code></td><td style='text-align: left;'>&#169;</td>
</tr><tr><td style='text-align: left;'><code>&amp;pound;</code></td><td style='text-align: left;'>&#163;</td>
</tr><tr><td style='text-align: left;'><code>a&amp;nbsp;b</code></td><td style='text-align: left;'>a&#160;b</td>
</tr><tr><td style='text-align: left;'><code>&amp;lambda;</code></td><td style='text-align: left;'>&#955;</td>
</tr><tr><td style='text-align: left;'><code>&amp;mdash;</code></td><td style='text-align: left;'>&#8212;</td>
<table><thead><tr><th>Entity</th><th>Result</th></tr></thead><tbody><tr><td style="text-align: left;"><code>&amp;copy;</code></td><td style="text-align: left;">&#169;</td>
</tr><tr><td style="text-align: left;"><code>&amp;pound;</code></td><td style="text-align: left;">&#163;</td>
</tr><tr><td style="text-align: left;"><code>a&amp;nbsp;b</code></td><td style="text-align: left;">a&#160;b</td>
</tr><tr><td style="text-align: left;"><code>&amp;lambda;</code></td><td style="text-align: left;">&#955;</td>
</tr><tr><td style="text-align: left;"><code>&amp;mdash;</code></td><td style="text-align: left;">&#8212;</td>
</tr></tbody></table>
<p>Entity-substitution does not happen in code blocks or inline code.</p>
@ -92,15 +92,3 @@ The following should not be translated:
It should read just like this: .
*** Output of to_s ***
Maruku translates HTML entities to the equivalent in LaTeX:EntityResultabEntity-substitution does not happen in code blocks or inline code.The following should not be translated:It should read just like this: .
*** EOF ***
OK!
*** Output of Markdown.pl ***
(not used anymore)
*** Output of Markdown.pl (parsed) ***
(not used anymore)

View File

@ -65,15 +65,3 @@ of paragraph
End of
*** Output of to_s ***
Hello: ! ! ` { } [ ] ( ) # . ! * * *Ora, emphasis, bold, * <- due asterischi-> * , un underscore-> _ , emphasis, incrediblee!This is (after) of paragraphEnd of
*** EOF ***
OK!
*** Output of Markdown.pl ***
(not used anymore)
*** Output of Markdown.pl (parsed) ***
(not used anymore)

View File

@ -50,15 +50,3 @@ md_el(:document,[
ApplePomaceous fruit of plants of the genus Malus in the family Rosaceae.OrangeThe fruit of an evergreen tree of the genus Citrus.
*** Output of to_s ***
ApplePomaceous fruit of plants of the genus Malus in the family Rosaceae.OrangeThe fruit of an evergreen tree of the genus Citrus.
*** EOF ***
OK!
*** Output of Markdown.pl ***
(not used anymore)
*** Output of Markdown.pl (parsed) ***
(not used anymore)

View File

@ -33,15 +33,15 @@ md_el(:document,[
])
],{},[])
*** Output of to_html ***
<h1 id='header1'>Header 1</h1>
<h1 id="header1">Header 1</h1>
<h2 id='header2'>Header 2</h2>
<h2 id="header2">Header 2</h2>
<h3 id='header3'>Header 3</h3>
<h3 id="header3">Header 3</h3>
<p>Then you can create links to different parts of the same document like this:</p>
<p><a href='#header1'>Link back to header 1</a>, <a href='#header2'>Link back to header 2</a>, <a href='#header3'>Link back to header 3</a></p>
<p><a href="#header1">Link back to header 1</a>, <a href="#header2">Link back to header 2</a>, <a href="#header3">Link back to header 3</a></p>
*** Output of to_latex ***
\hypertarget{header1}{}\section*{{Header 1}}\label{header1}
@ -61,15 +61,3 @@ Link back to header 2,
Link back to header 3
*** Output of to_s ***
Header 1Header 2Header 3Then you can create links to different parts of the same document like this:Link back to header 1, Link back to header 2, Link back to header 3
*** EOF ***
OK!
*** Output of Markdown.pl ***
(not used anymore)
*** Output of Markdown.pl (parsed) ***
(not used anymore)

View File

@ -21,8 +21,8 @@ md_el(:document,[
],{:align=>[:left, :left]},[])
],{},[])
*** Output of to_html ***
<table><thead><tr><th>First Header</th><th>Second Header</th></tr></thead><tbody><tr><td style='text-align: left;'>Content Cell</td><td style='text-align: left;'>Content Cell</td>
</tr><tr><td style='text-align: left;'>Content Cell</td><td style='text-align: left;'>Content Cell</td>
<table><thead><tr><th>First Header</th><th>Second Header</th></tr></thead><tbody><tr><td style="text-align: left;">Content Cell</td><td style="text-align: left;">Content Cell</td>
</tr><tr><td style="text-align: left;">Content Cell</td><td style="text-align: left;">Content Cell</td>
</tr></tbody></table>
*** Output of to_latex ***
\begin{tabular}{l|l}
@ -35,15 +35,3 @@ Content Cell&Content Cell\\
First HeaderSecond HeaderContent CellContent CellContent CellContent Cell
*** Output of to_s ***
First HeaderSecond HeaderContent CellContent CellContent CellContent Cell
*** EOF ***
OK!
*** Output of Markdown.pl ***
(not used anymore)
*** Output of Markdown.pl (parsed) ***
(not used anymore)

View File

@ -54,20 +54,20 @@ md_el(:document,[
md_par(["This is not a footnote."])
],{},[])
*** Output of to_html ***
<p>That&#8217;s some text with a footnote <sup id='fnref:1'><a href='#fn:1' rel='footnote'>1</a></sup> and another <sup id='fnref:2'><a href='#fn:2' rel='footnote'>2</a></sup> and another <sup id='fnref:3'><a href='#fn:3' rel='footnote'>3</a></sup>.</p>
<p>That&#8217;s some text with a footnote <sup id="fnref:1"><a href="#fn:1" rel="footnote">1</a></sup> and another <sup id="fnref:2"><a href="#fn:2" rel="footnote">2</a></sup> and another <sup id="fnref:3"><a href="#fn:3" rel="footnote">3</a></sup>.</p>
<p>This is not a footnote.</p>
<div class='footnotes'><hr /><ol><li id='fn:1'>
<p>And that&#8217;s the footnote. This is second sentence (same paragraph).</p>
<a href='#fnref:1' rev='footnote'>&#8617;</a></li><li id='fn:2'>
<div class="footnotes"><hr/><ol><li id="fn:1">
<p>And that&#8217;s the footnote. This is second sentence (same paragraph). <a href="#fnref:1" rev="footnote">&#8617;</a></p>
</li><li id="fn:2">
<p>This is the very long one.</p>
<p>That&#8217;s the second paragraph.</p>
<a href='#fnref:2' rev='footnote'>&#8617;</a></li><li id='fn:3'>
<p>That&#8217;s the second paragraph. <a href="#fnref:2" rev="footnote">&#8617;</a></p>
</li><li id="fn:3">
<p>And that&#8217;s the footnote.</p>
<p>That&#8217;s the second paragraph of the footnote.</p>
<a href='#fnref:3' rev='footnote'>&#8617;</a></li></ol></div>
<p>That&#8217;s the second paragraph of the footnote. <a href="#fnref:3" rev="footnote">&#8617;</a></p>
</li></ol></div>
*** Output of to_latex ***
That'{}s some text with a footnote \footnote{And that'{}s the footnote. This is second sentence (same paragraph).} and another \footnote{This is the very long one.
@ -95,15 +95,3 @@ That s the second paragraph.
This is not a footnote.
*** Output of to_s ***
Thats some text with a footnote and another and another .And thats the footnote.Thats the second paragraph of the footnote.And thats the footnote. This is second sentence (same paragraph).This is the very long one.Thats the second paragraph.This is not a footnote.
*** EOF ***
OK!
*** Output of Markdown.pl ***
(not used anymore)
*** Output of Markdown.pl (parsed) ***
(not used anymore)

View File

@ -20,30 +20,18 @@ md_el(:document,[
md_el(:header,["A title with ", md_em(["emphasis"])],{:level=>4},[])
],{},[])
*** Output of to_html ***
<h1 id='a_title_with_emphasis'>A title with <em>emphasis</em></h1>
<h1 id="a_title_with_emphasis_1">A title with <em>emphasis</em></h1>
<h2 id='a_title_with_emphasis'>A title with <em>emphasis</em></h2>
<h2 id="a_title_with_emphasis_2">A title with <em>emphasis</em></h2>
<h4 id='a_title_with_emphasis'>A title with <em>emphasis</em></h4>
<h4 id="a_title_with_emphasis_3">A title with <em>emphasis</em></h4>
*** Output of to_latex ***
\hypertarget{a_title_with_emphasis}{}\section*{{A title with \emph{emphasis}}}\label{a_title_with_emphasis}
\hypertarget{a_title_with_emphasis_1}{}\section*{{A title with \emph{emphasis}}}\label{a_title_with_emphasis_1}
\hypertarget{a_title_with_emphasis}{}\subsection*{{A title with \emph{emphasis}}}\label{a_title_with_emphasis}
\hypertarget{a_title_with_emphasis_2}{}\subsection*{{A title with \emph{emphasis}}}\label{a_title_with_emphasis_2}
\hypertarget{a_title_with_emphasis}{}\paragraph*{{A title with \emph{emphasis}}}\label{a_title_with_emphasis}
\hypertarget{a_title_with_emphasis_3}{}\paragraph*{{A title with \emph{emphasis}}}\label{a_title_with_emphasis_3}
*** Output of to_md ***
A title with emphasisA title with emphasisA title with emphasis
*** Output of to_s ***
A title with emphasisA title with emphasisA title with emphasis
*** EOF ***
OK!
*** Output of Markdown.pl ***
(not used anymore)
*** Output of Markdown.pl (parsed) ***
(not used anymore)

View File

@ -35,15 +35,3 @@ alpha, and or for the Arabic letter
alef.
*** Output of to_s ***
Examples of numeric character references include or for the copyright symbol, or for the Greek capital letter alpha, and or for the Arabic letter alef.
*** EOF ***
OK!
*** Output of Markdown.pl ***
(not used anymore)
*** Output of Markdown.pl (parsed) ***
(not used anymore)

View File

@ -37,15 +37,3 @@ md_el(:document,[
*** Output of to_s ***
*** EOF ***
OK!
*** Output of Markdown.pl ***
(not used anymore)
*** Output of Markdown.pl (parsed) ***
(not used anymore)

View File

@ -12,23 +12,11 @@ md_el(:document,[
md_html("<div></div>")
],{},[])
*** Output of to_html ***
<p>One <div />123</p>
<div />
<p>One <div/>123</p>
<div/>
*** Output of to_latex ***
One 123
*** Output of to_md ***
One 123
*** Output of to_s ***
One 123
*** EOF ***
OK!
*** Output of Markdown.pl ***
(not used anymore)
*** Output of Markdown.pl (parsed) ***
(not used anymore)

View File

@ -22,22 +22,10 @@ md_el(:document,[
])
],{},[])
*** Output of to_html ***
<p>taking part in <a href='http://sied.dis.uniroma1.it/'>some arcane conspirations</a> which involve <b href='http://www.flickr.com/photos/censi/70893277/'>coffee</b>, <a href='http://flickr.com/photos/censi/42775664/in/set-936677/'>robots</a>, <a href='http://www.flickr.com/photos/censi/42775888/in/set-936677/'>sushi</a>,</p>
<p>taking part in <a href="http://sied.dis.uniroma1.it/">some arcane conspirations</a> which involve <b href="http://www.flickr.com/photos/censi/70893277/">coffee</b>, <a href="http://flickr.com/photos/censi/42775664/in/set-936677/">robots</a>, <a href="http://www.flickr.com/photos/censi/42775888/in/set-936677/">sushi</a>,</p>
*** Output of to_latex ***
taking part in which involve , , ,
*** Output of to_md ***
taking part in which involve , , ,
*** Output of to_s ***
taking part in which involve , , ,
*** EOF ***
OK!
*** Output of Markdown.pl ***
(not used anymore)
*** Output of Markdown.pl (parsed) ***
(not used anymore)

View File

@ -14,8 +14,8 @@ md_el(:document,[
md_html("<div class=\"frame\">\n\t<a class=\"photo\" href=\"http://www.flickr.com/photos/censi/54757256/\"><img alt=\"\"\n moz-do-not-send=\"true\"\n src=\"http://static.flickr.com/27/54757256_1a2c1d2a95_m.jpg\" /></a>\n</div>")
],{},[])
*** Output of to_html ***
<div class='frame'>
<a href='http://www.flickr.com/photos/censi/54757256/' class='photo'><img src='http://static.flickr.com/27/54757256_1a2c1d2a95_m.jpg' moz-do-not-send='true' alt='' /></a>
<div class="frame">
<a class="photo" href="http://www.flickr.com/photos/censi/54757256/"><img alt="" moz-do-not-send="true" src="http://static.flickr.com/27/54757256_1a2c1d2a95_m.jpg"/></a>
</div>
*** Output of to_latex ***
@ -23,15 +23,3 @@ md_el(:document,[
*** Output of to_s ***
*** EOF ***
OK!
*** Output of Markdown.pl ***
(not used anymore)
*** Output of Markdown.pl (parsed) ***
(not used anymore)

View File

@ -12,8 +12,8 @@ md_el(:document,[
md_html(" <div class=\"frame\">\n <a class=\"photo\" href=\"http://www.flickr.com/photos/censi/88561568/\" ><img moz-do-not-send=\"true\" src=\"http://static.flickr.com/28/88561568_ab84d28245_m.jpg\" width=\"240\" height=\"180\" alt=\"Aperitif\" /></a>\n </div>")
],{},[])
*** Output of to_html ***
<div class='frame'>
<a href='http://www.flickr.com/photos/censi/88561568/' class='photo'><img src='http://static.flickr.com/28/88561568_ab84d28245_m.jpg' height='180' moz-do-not-send='true' alt='Aperitif' width='240' /></a>
<div class="frame">
<a class="photo" href="http://www.flickr.com/photos/censi/88561568/"><img moz-do-not-send="true" src="http://static.flickr.com/28/88561568_ab84d28245_m.jpg" width="240" height="180" alt="Aperitif"/></a>
</div>
*** Output of to_latex ***
@ -21,15 +21,3 @@ md_el(:document,[
*** Output of to_s ***
*** EOF ***
OK!
*** Output of Markdown.pl ***
(not used anymore)
*** Output of Markdown.pl (parsed) ***
(not used anymore)

View File

@ -27,15 +27,15 @@ md_el(:document,[
md_el(:code,[],{:raw_code=>"<p>here's an apostrophe & a quote \"</p>"},[["html_use_syntax", "true"], ["lang", "xml"]])
],{},[])
*** Output of to_html ***
<p><code>&lt;p&gt;here&#39;s an apostrophe &amp; a quote &quot;&lt;/p&gt;</code></p>
<p><code>&lt;p&gt;here's an apostrophe &amp; a quote "&lt;/p&gt;</code></p>
<pre><code>&lt;p&gt;here&#39;s an apostrophe &amp; a quote &quot;&lt;/p&gt;</code></pre>
<pre><code>&lt;p&gt;here's an apostrophe &amp; a quote "&lt;/p&gt;</code></pre>
<pre lang='xml'><code class='xml' lang='xml'>&lt;p&gt;here&#39;s an apostrophe &amp; a quote &quot;&lt;/p&gt;</code></pre>
<pre class="xml"><code lang="xml">&lt;p&gt;here's an apostrophe &amp; a quote "&lt;/p&gt;</code></pre>
<pre><code class='not_supported' lang='not_supported'>&lt;p&gt;here&#39;s an apostrophe &amp; a quote &quot;&lt;/p&gt;</code></pre>
<pre class="not_supported"><code lang="not_supported">&lt;p&gt;here's an apostrophe &amp; a quote "&lt;/p&gt;</code></pre>
<pre><code class='xml' lang='xml'><span class='punct'>&lt;</span><span class='tag'>p</span><span class='punct'>&gt;</span>here&#39;s an apostrophe &amp; a quote &quot;<span class='punct'>&lt;/</span><span class='tag'>p</span><span class='punct'>&gt;</span></code></pre>
<pre class="xml"><code lang="xml"><span class="punct">&lt;</span><span class="tag">p</span><span class="punct">&gt;</span>here's an apostrophe &amp; a quote "<span class="punct">&lt;/</span><span class="tag">p</span><span class="punct">&gt;</span></code></pre>
*** Output of to_latex ***
{\colorbox[rgb]{1.00,0.93,1.00}{\tt \char60p\char62here\char39s~an~apostrophe~\char38~a~quote~\char34\char60\char47p\char62}}
@ -47,15 +47,3 @@ md_el(:document,[
*** Output of to_s ***
*** EOF ***
OK!
*** Output of Markdown.pl ***
(not used anymore)
*** Output of Markdown.pl (parsed) ***
(not used anymore)

View File

@ -52,15 +52,15 @@ md_el(:document,[
md_ref_def("css2", "http://jigsaw.w3.org/css-validator/images/vcss", {:title=>"Optional title attribute"})
],{},[])
*** Output of to_html ***
<p>This page does not uilizes <img src='http://jigsaw.w3.org/css-validator/images/vcss' alt='Cascading Style Sheets' /></p>
<p>This page does not uilizes <img src="http://jigsaw.w3.org/css-validator/images/vcss" alt="Cascading Style Sheets"/></p>
<p>Please mouseover to see the title: <img src='http://jigsaw.w3.org/css-validator/images/vcss' alt='Cascading Style Sheets' /></p>
<p>Please mouseover to see the title: <img src="http://jigsaw.w3.org/css-validator/images/vcss" alt="Cascading Style Sheets"/></p>
<p>Please mouseover to see the title: <img src='http://jigsaw.w3.org/css-validator/images/vcss' alt='Cascading Style Sheets' /></p>
<p>Please mouseover to see the title: <img src="http://jigsaw.w3.org/css-validator/images/vcss" alt="Cascading Style Sheets"/></p>
<p>I&#8217;ll say it one more time: this page does not use <img src='http://jigsaw.w3.org/css-validator/images/vcss' alt='Cascading Style Sheets' /></p>
<p>I&#8217;ll say it one more time: this page does not use <img src="http://jigsaw.w3.org/css-validator/images/vcss" alt="Cascading Style Sheets"/></p>
<p>This is double size: <img src='http://jigsaw.w3.org/css-validator/images/vcss' alt='Cascading Style Sheets' /></p>
<p>This is double size: <img src="http://jigsaw.w3.org/css-validator/images/vcss" alt="Cascading Style Sheets"/></p>
*** Output of to_latex ***
This page does not uilizes
@ -88,15 +88,3 @@ This is double size:
Cascading Style Sheets
*** Output of to_s ***
This page does not uilizes Cascading Style SheetsPlease mouseover to see the title: Cascading Style SheetsPlease mouseover to see the title: Cascading Style SheetsIll say it one more time: this page does not use Cascading Style SheetsThis is double size: Cascading Style Sheets
*** EOF ***
OK!
*** Output of Markdown.pl ***
(not used anymore)
*** Output of Markdown.pl (parsed) ***
(not used anymore)

View File

@ -16,9 +16,9 @@ md_el(:document,[
md_ref_def("image", "image.jpg", {:title=>nil})
],{},[])
*** Output of to_html ***
<p>This is an <img src='image.jpg' alt='image' />.</p>
<p>This is an <img src="image.jpg" alt="image"/>.</p>
<p>This is an <img src='image.jpg' alt='image' />.</p>
<p>This is an <img src="image.jpg" alt="image"/>.</p>
*** Output of to_latex ***
This is an .
@ -29,15 +29,3 @@ This is an image.
This is an image.
*** Output of to_s ***
This is an image.This is an image.
*** EOF ***
OK!
*** Output of Markdown.pl ***
(not used anymore)
*** Output of Markdown.pl (parsed) ***
(not used anymore)

View File

@ -71,14 +71,14 @@ md_el(:document,[
<p>Input:</p>
<pre><code>&lt;img src=&quot;http://jigsaw.w3.org/css-validator/images/vcss&quot;/&gt;</code></pre>
<pre><code>&lt;img src="http://jigsaw.w3.org/css-validator/images/vcss"/&gt;</code></pre>
<p>Result on span: <img src='http://jigsaw.w3.org/css-validator/images/vcss' /></p>
<p>Result on span: <img src="http://jigsaw.w3.org/css-validator/images/vcss"/></p>
<p>Result alone:</p>
<img src='http://jigsaw.w3.org/css-validator/images/vcss' />
<img src="http://jigsaw.w3.org/css-validator/images/vcss"/>
<p>Without closing:</p>
<img src='http://jigsaw.w3.org/css-validator/images/vcss' /><div>
<img src="http://jigsaw.w3.org/css-validator/images/vcss" /><div>
<p>
<p>This is</p>
<em>
@ -106,20 +106,8 @@ md_el(:document,[
</p>
</div><table>
<tr>
<td>
<p>This is a</p>
<em>
<p>true</p>
</em>
<p>markdown text. (no par)</p>
</td>
<td>
<p>This is</p>
<em>
<p>true</p>
</em>
<p>markdown text. (par)</p>
</td>
<td><p>This is a</p><em><p>true</p></em><p>markdown text. (no par)</p></td>
<td><p>This is</p><em><p>true</p></em><p>markdown text. (par)</p></td>
</tr>
</table>
*** Output of to_latex ***
@ -150,15 +138,3 @@ Result alone:
Without closing:
*** Output of to_s ***
Input:Result: Input:Result on span: Result alone:Without closing:
*** EOF ***
OK!
*** Output of Markdown.pl ***
(not used anymore)
*** Output of Markdown.pl (parsed) ***
(not used anymore)

View File

@ -19,15 +19,3 @@ md_el(:document,[
*** Output of to_s ***
*** EOF ***
OK!
*** Output of Markdown.pl ***
(not used anymore)
*** Output of Markdown.pl (parsed) ***
(not used anymore)

View File

@ -81,28 +81,28 @@ md_el(:document,[
md_ref_def("google_images", "http://images.google.com", {:title=>"Google images"})
],{},[])
*** Output of to_html ***
<p>Search on <a href='http://www.google.com'>Google</a></p>
<p>Search on <a href="http://www.google.com">Google</a></p>
<p>Search on <a href='http://www.google.com'>Google</a></p>
<p>Search on <a href="http://www.google.com">Google</a></p>
<p>Search on <a href='http://www.google.com'>Google</a></p>
<p>Search on <a href="http://www.google.com">Google</a></p>
<p>Search on <a href='http://www.google.com'>Google</a></p>
<p>Search on <a href="http://www.google.com">Google</a></p>
<p>Search on <a href='http://images.google.com' title='Google images'>Google images</a></p>
<p>Search on <a href="http://images.google.com" title="Google images">Google images</a></p>
<p>Inline: <a href='http://google.com'>Google images</a></p>
<p>Inline: <a href="http://google.com">Google images</a></p>
<p>Inline with title: <a href='http://google.com' title='Title'>Google images</a></p>
<p>Inline with title: <a href="http://google.com" title="Title">Google images</a></p>
<p>Inline with title: <a href='http://google.com' title='Title'>Google images</a></p>
<p>Inline with title: <a href="http://google.com" title="Title">Google images</a></p>
<p>Search on <a href='http://www.gogole.com'>http://www.gogole.com</a> or <a href='http://Here.com'>http://Here.com</a> or ask <a href='mailto:bill@google.com'>&#098;&#105;&#108;&#108;&#064;&#103;&#111;&#111;&#103;&#108;&#101;&#046;&#099;&#111;&#109;</a> or you might ask bill@google.com.</p>
<p>Search on <a href="http://www.gogole.com">http://www.gogole.com</a> or <a href="http://Here.com">http://Here.com</a> or ask <a href="mailto:bill@google.com">&#098;&#105;&#108;&#108;&#064;&#103;&#111;&#111;&#103;&#108;&#101;&#046;&#099;&#111;&#109;</a> or you might ask bill@google.com.</p>
<p>If all else fails, ask <a href='http://www.google.com'>Google</a></p>
<p>If all else fails, ask <a href="http://www.google.com">Google</a></p>
<p>And now <a href='http://images.google.com' title='Google images'>reference-style link ID with spaces</a></p>
*** Output of to_latex ***
<p>And now <a href="http://images.google.com" title="Google images">reference-style link ID with spaces</a></p>
** Output of to_latex ***
Search on \href{http://www.google.com}{Google}
Search on \href{http://www.google.com}{Google}
@ -150,15 +150,3 @@ And now
reference-style link ID with spaces
*** Output of to_s ***
Search on GoogleSearch on GoogleSearch on GoogleSearch on GoogleSearch on Google imagesInline: Google imagesInline with title: Google imagesInline with title: Google imagesSearch on or or ask or you might ask bill@google.com.If all else fails, ask GoogleAnd now reference-style link ID with spaces
*** EOF ***
OK!
*** Output of Markdown.pl ***
(not used anymore)
*** Output of Markdown.pl (parsed) ***
(not used anymore)

View File

@ -20,15 +20,3 @@ See \href{http://agorf.gr/}{foo'{} bar}
See foo bar
*** Output of to_s ***
See foo bar
*** EOF ***
OK!
*** Output of Markdown.pl ***
(not used anymore)
*** Output of Markdown.pl (parsed) ***
(not used anymore)

View File

@ -44,15 +44,3 @@ This is a blockquote inside a list
item.
*** Output of to_s ***
A list item with a blockquote:This is a blockquote inside a list item.
*** EOF ***
OK!
*** Output of Markdown.pl ***
(not used anymore)
*** Output of Markdown.pl (parsed) ***
(not used anymore)

View File

@ -15,7 +15,7 @@ md_el(:document,[
],{},[])
*** Output of to_html ***
<ul>
<li><a href='http://maruku.org/'>Maruku</a>: good.</li>
<li><a href="http://maruku.org/">Maruku</a>: good.</li>
</ul>
*** Output of to_latex ***
\begin{itemize}%
@ -26,15 +26,3 @@ md_el(:document,[
-aruku: good.
*** Output of to_s ***
Maruku: good.
*** EOF ***
OK!
*** Output of Markdown.pl ***
(not used anymore)
*** Output of Markdown.pl (parsed) ***
(not used anymore)

View File

@ -54,15 +54,3 @@ This is the second paragraph in the list item. Youre only required to indent the
-ther
*** Output of to_s ***
This is a list item with two paragraphs.This is the second paragraph in the list item. Youre only required to indent the first line. Lorem ipsum dolor sit amet, consectetuer adipiscing elit.other
*** EOF ***
OK!
*** Output of Markdown.pl ***
(not used anymore)
*** Output of Markdown.pl (parsed) ***
(not used anymore)

View File

@ -62,15 +62,3 @@ item.
- list item with a code block:
*** Output of to_s ***
A list item with a blockquote:This is a blockquote inside a list item.A list item with a code block:
*** EOF ***
OK!
*** Output of Markdown.pl ***
(not used anymore)
*** Output of Markdown.pl (parsed) ***
(not used anymore)

View File

@ -87,15 +87,3 @@ This is a list:
This is not a list: 1987. one ciao
*** Output of to_s ***
This is a list:onetwoThis is not a list: * one ciaoThis is a list:onetwoThis is not a list: 1987. one ciao
*** EOF ***
OK!
*** Output of Markdown.pl ***
(not used anymore)
*** Output of Markdown.pl (parsed) ***
(not used anymore)

View File

@ -190,15 +190,3 @@ This is the second paragraph in the list item. Youre only required to indent the
-nother item in the same list.
*** Output of to_s ***
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aliquam hendrerit mi posuere lectus. Vestibulum enim wisi, viverra nec, fringilla in, laoreet vitae, risus.Donec sit amet nisl. Aliquam semper ipsum sit amet velit. Suspendisse id sem consectetuer libero luctus adipiscing.Donec sit amet nisl. Aliquam semper ipsum sit amet velit. Suspendisse id sem consectetuer libero luctus adipiscing.Donec sit amet nisl. Aliquam semper ipsum sit amet velit. Suspendisse id sem consectetuer libero luctus adipiscing.Donec sit amet nisl. Aliquam semper ipsum sit amet velit. Suspendisse id sem consectetuer libero luctus adipiscing.AncoraThis is a list item with two paragraphs. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aliquam hendrerit mi posuere lectus.ATTENZIONE!Suspendisse id sem consectetuer libero luctus adipiscing.AncoraThis is a list item with two paragraphs.This is the second paragraph in the list item. Youre only required to indent the first line. Lorem ipsum dolor sit amet, consectetuer adipiscing elit.Another item in the same list.
*** EOF ***
OK!
*** Output of Markdown.pl ***
(not used anymore)
*** Output of Markdown.pl (parsed) ***
(not used anymore)

View File

@ -10,14 +10,14 @@ List:
md_el(:document,[
md_par(["List:"]),
md_el(:ul,[
md_el(:li_span,["\303\250", md_code("gcc")],{:want_my_paragraph=>false},[])
md_el(:li_span,["è", md_code("gcc")],{:want_my_paragraph=>false},[])
],{},[])
],{},[])
*** Output of to_html ***
<p>List:</p>
<ul>
<li>è<code>gcc</code></li>
<li>&#xE8;<code>gcc</code></li>
</ul>
*** Output of to_latex ***
List:
@ -29,18 +29,6 @@ List:
*** Output of to_md ***
List:
-¨
- è`gcc`
*** Output of to_s ***
List:è
*** EOF ***
OK!
*** Output of Markdown.pl ***
(not used anymore)
*** Output of Markdown.pl (parsed) ***
(not used anymore)

View File

@ -0,0 +1,23 @@
Write a comment here
*** Parameters: ***
{} # params
*** Markdown input: ***
- ένα
*** Output of inspect ***
md_el(:document,[
md_el(:ul,[md_el(:li_span,["ένα"],{:want_my_paragraph=>false},[])],{},[])
],{},[])
*** Output of to_html ***
<ul>
<li>&#x3AD;&#x3BD;&#x3B1;</li>
</ul>
*** Output of to_latex ***
\begin{itemize}%
\item ένα
\end{itemize}
*** Output of to_md ***
- ένα
*** Output of to_s ***
ένα

View File

@ -39,15 +39,3 @@ md_el(:document,[],{},[])
*** Output of to_s ***
*** EOF ***
OK!
*** Output of Markdown.pl ***
(not used anymore)
*** Output of Markdown.pl (parsed) ***
(not used anymore)

View File

@ -62,15 +62,3 @@ md_el(:document,[
-ue
*** Output of to_s ***
DuetretretreDue
*** EOF ***
OK!
*** Output of Markdown.pl ***
(not used anymore)
*** Output of Markdown.pl (parsed) ***
(not used anymore)

View File

@ -102,9 +102,9 @@ md_el(:document,[
<p>Paragraph (1 space after), list with no space: * ciao</p>
<p>Paragraph (2 spaces after), list with no space:<br />* ciao</p>
<p>Paragraph (2 spaces after), list with no space:<br/>* ciao</p>
<p>Paragraph (3 spaces after), list with no space: <br />* ciao</p>
<p>Paragraph (3 spaces after), list with no space: <br/>* ciao</p>
<p>Paragraph with block quote:</p>
@ -114,13 +114,13 @@ md_el(:document,[
<p>Paragraph with header:</p>
<h3 id='header'>header</h3>
<h3 id="header_1">header</h3>
<p>Paragraph with header on two lines:</p>
<h2 id='header'>header</h2>
<h2 id="header_2">header</h2>
<p>Paragraph with html after <div /></p>
<p>Paragraph with html after <div/></p>
<p>Paragraph with html after, indented: <em>Emphasis</em></p>
@ -153,11 +153,11 @@ Quoted
\end{quote}
Paragraph with header:
\hypertarget{header}{}\subsubsection*{{header}}\label{header}
\hypertarget{header_1}{}\subsubsection*{{header}}\label{header_1}
Paragraph with header on two lines:
\hypertarget{header}{}\subsection*{{header}}\label{header}
\hypertarget{header_2}{}\subsection*{{header}}\label{header_2}
Paragraph with html after
@ -206,15 +206,3 @@ tralla
Paragraph with html after, indented:
*** Output of to_s ***
Paragraph, list with no space: * ciaoParagraph, list with 1 space: * ciaoParagraph, list with 3 space: * ciaoParagraph, list with 4 spaces: * ciaoParagraph, list with 1 tab: * ciaoParagraph (1 space after), list with no space: * ciaoParagraph (2 spaces after), list with no space:* ciaoParagraph (3 spaces after), list with no space: * ciaoParagraph with block quote:QuotedParagraph with header:headerParagraph with header on two lines:headerParagraph with html after Paragraph with html after, indented: Paragraph with html after, indented: tralla Paragraph with html after, indented:
*** EOF ***
OK!
*** Output of Markdown.pl ***
(not used anymore)
*** Output of Markdown.pl (parsed) ***
(not used anymore)

View File

@ -260,15 +260,3 @@ This is the second paragraph in the list item. Youre only required to indent the
-nother item in the same list.
*** Output of to_s ***
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aliquam hendrerit mi posuere lectus. Vestibulum enim wisi, viverra nec, fringilla in, laoreet vitae, risus.Donec sit amet nisl. Aliquam semper ipsum sit amet velit. Suspendisse id sem consectetuer libero luctus adipiscing.Donec sit amet nisl. Aliquam semper ipsum sit amet velit. Suspendisse id sem consectetuer libero luctus adipiscing.Donec sit amet nisl. Aliquam semper ipsum sit amet velit. Suspendisse id sem consectetuer libero luctus adipiscing.Donec sit amet nisl. Aliquam semper ipsum sit amet velit. Suspendisse id sem consectetuer libero luctus adipiscing.AncoraThis is a list item with two paragraphs. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aliquam hendrerit mi posuere lectus.ATTENZIONE!UnoDuetretretreDueSuspendisse id sem consectetuer libero luctus adipiscing.AncoraThis is a list item with two paragraphs.This is the second paragraph in the list item. Youre only required to indent the first line. Lorem ipsum dolor sit amet, consectetuer adipiscing elit.Another item in the same list.
*** EOF ***
OK!
*** Output of Markdown.pl ***
(not used anymore)
*** Output of Markdown.pl (parsed) ***
(not used anymore)

View File

@ -7,22 +7,10 @@ Write a comment here
*** Output of inspect ***
md_el(:document,[md_html("<br />")],{},[])
*** Output of to_html ***
<br />
<br/>
*** Output of to_latex ***
*** Output of to_md ***
*** Output of to_s ***
*** EOF ***
OK!
*** Output of Markdown.pl ***
(not used anymore)
*** Output of Markdown.pl (parsed) ***
(not used anymore)

View File

@ -0,0 +1,45 @@
Write a comment here
*** Parameters: ***
require 'maruku/ext/math';{}
*** Markdown input: ***
$$ x = y $$
$$ x
= y $$
$$
x = y $$
$$ x = y
$$
*** Output of inspect ***
md_el(:document,[
md_el(:equation,[],{:label=>nil,:math=>" x = y ",:num=>nil},[]),
md_el(:equation,[],{:label=>nil,:math=>" x = y \n",:num=>nil},[]),
md_el(:equation,[],{:label=>nil,:math=>" x = y \n",:num=>nil},[]),
md_el(:equation,[],{:label=>nil,:math=>" x = y \n",:num=>nil},[])
],{},[])
*** Output of to_html ***
<div class='maruku-equation'><code class='maruku-mathml'> x = y </code><span class='maruku-eq-tex'><code style='display: none'>x = y</code></span></div><div class='maruku-equation'><code class='maruku-mathml'> x = y
</code><span class='maruku-eq-tex'><code style='display: none'>x = y</code></span></div><div class='maruku-equation'><code class='maruku-mathml'> x = y
</code><span class='maruku-eq-tex'><code style='display: none'>x = y</code></span></div><div class='maruku-equation'><code class='maruku-mathml'> x = y
</code><span class='maruku-eq-tex'><code style='display: none'>x = y</code></span></div>
*** Output of to_latex ***
\begin{displaymath}
x = y
\end{displaymath}
\begin{displaymath}
x = y
\end{displaymath}
\begin{displaymath}
x = y
\end{displaymath}
\begin{displaymath}
x = y
\end{displaymath}
*** Output of to_md ***
*** Output of to_s ***

View File

@ -44,15 +44,3 @@ Here are some formulas:
That s it, nothing else is supported.
*** Output of to_s ***
Here are some formulas:Thats it, nothing else is supported.
*** EOF ***
OK!
*** Output of Markdown.pl ***
(not used anymore)
*** Output of Markdown.pl (parsed) ***
(not used anymore)

View File

@ -0,0 +1,45 @@
*** Parameters: ***
require 'maruku/ext/math'
{:math_numbered => ['\\['], :html_math_engine => 'itex2mml' }
*** Markdown input: ***
\[
\alpha
\]
\begin{equation}
\alpha
\end{equation}
\begin{equation} \beta
\end{equation}
\begin{equation} \gamma \end{equation}
*** Output of inspect ***
md_el(:document,[
md_el(:equation,[],{:label=>"eq1",:math=>"\t\\alpha\n\n",:num=>1},[]),
md_el(:equation,[],{:label=>nil,:math=>"\t\\alpha\n\n",:num=>nil},[]),
md_el(:equation,[],{:label=>nil,:math=>" \\beta\n",:num=>nil},[]),
md_el(:equation,[],{:label=>nil,:math=>" \\gamma ",:num=>nil},[])
],{},[])
*** Output of to_html ***
<div class="maruku-equation" id="eq:eq1"><span class="maruku-eq-number">(1)</span><math xmlns="http://www.w3.org/1998/Math/MathML" display="block" class="maruku-mathml"><mi>&#x3B1;</mi></math><span class="maruku-eq-tex"><code style="display: none">\alpha</code></span></div><div class="maruku-equation"><math xmlns="http://www.w3.org/1998/Math/MathML" display="block" class="maruku-mathml"><mi>&#x3B1;</mi></math><span class="maruku-eq-tex"><code style="display: none">\alpha</code></span></div><div class="maruku-equation"><math xmlns="http://www.w3.org/1998/Math/MathML" display="block" class="maruku-mathml"><mi>&#x3B2;</mi></math><span class="maruku-eq-tex"><code style="display: none">\beta</code></span></div><div class="maruku-equation"><math xmlns="http://www.w3.org/1998/Math/MathML" display="block" class="maruku-mathml"><mi>&#x3B3;</mi></math><span class="maruku-eq-tex"><code style="display: none">\gamma</code></span></div>
*** Output of to_latex ***
\begin{equation}
\alpha
\label{eq1}\end{equation}
\begin{displaymath}
\alpha
\end{displaymath}
\begin{displaymath}
\beta
\end{displaymath}
\begin{displaymath}
\gamma
\end{displaymath}
*** Output of to_md ***
*** Output of to_s ***

View File

@ -23,15 +23,3 @@ This is not $math$.
[ \alpha ]
*** Output of to_s ***
This is not $math$.[ \alpha ]
*** EOF ***
OK!
*** Output of Markdown.pl ***
(not used anymore)
*** Output of Markdown.pl (parsed) ***
(not used anymore)

View File

@ -13,8 +13,8 @@ md_el(:document,[
md_html("<table markdown='1'>\n\t$\\alpha$\n\t<thead>\n\t\t<td>$\\beta$</td>\n\t</thead>\n</table>")
],{},[])
*** Output of to_html ***
<table><math class='maruku-mathml' display='inline' xmlns='http://www.w3.org/1998/Math/MathML'><mi>&alpha;</mi></math><thead>
<td><math class='maruku-mathml' display='inline' xmlns='http://www.w3.org/1998/Math/MathML'><mi>&beta;</mi></math></td>
<table><math xmlns="http://www.w3.org/1998/Math/MathML" display="inline" class="maruku-mathml"><mi>&#x3B1;</mi></math><thead>
<td><math xmlns="http://www.w3.org/1998/Math/MathML" display="inline" class="maruku-mathml"><mi>&#x3B2;</mi></math></td>
</thead>
</table>
*** Output of to_latex ***
@ -23,15 +23,3 @@ md_el(:document,[
*** Output of to_s ***
*** EOF ***
OK!
*** Output of Markdown.pl ***
(not used anymore)
*** Output of Markdown.pl (parsed) ***
(not used anymore)

View File

@ -26,8 +26,8 @@ md_el(:document,[
md_el(:ald,[],{:ald=>[["scope", "row"]],:ald_id=>"r"},[])
],{},[])
*** Output of to_html ***
<table><thead><tr><th>Symbol</th><th>Meaning</th><th>comments</th></tr></thead><tbody><tr><th scope='row' style='text-align: left;'> &#945;</th><td style='text-align: left;'>The first</td><td style='text-align: left;'>I like it.</td>
</tr><tr><th scope='row' style='text-align: left;'> &aleph;</th><td style='text-align: left;'>The first</td><td style='text-align: left;'>I like it.</td>
<table><thead><tr><th>Symbol</th><th>Meaning</th><th>comments</th></tr></thead><tbody><tr><th scope="row" style="text-align: left;"> &#945;</th><td style="text-align: left;">The first</td><td style="text-align: left;">I like it.</td>
</tr><tr><th scope="row" style="text-align: left;"> &aleph;</th><td style="text-align: left;">The first</td><td style="text-align: left;">I like it.</td>
</tr></tbody></table>
*** Output of to_latex ***
\begin{tabular}{l|l|l}
@ -40,15 +40,3 @@ Symbol&Meaning&comments\\
SymbolMeaningcomments The firstI like it. The firstI like it.
*** Output of to_s ***
SymbolMeaningcomments The firstI like it. The firstI like it.
*** EOF ***
OK!
*** Output of Markdown.pl ***
(not used anymore)
*** Output of Markdown.pl (parsed) ***
(not used anymore)

View File

@ -333,87 +333,87 @@ md_el(:document,[
md_ref_def("javagenerics", "http://java.sun.com/j2se/1.5.0/docs/guide/language/generics.html", {:title=>nil})
],{},[])
*** Output of to_html ***
<h3 id='general'>General</h3>
<h3 id="general_1">General</h3>
<ul>
<li><em>Operating System</em> : <a href='http://www.apple.com/getamac/'>Mac OS X</a>: heaven, after the purgatory of Linux and the hell of Windows.</li>
<li><em>Operating System</em> : <a href="http://www.apple.com/getamac/">Mac OS X</a>: heaven, after the purgatory of Linux and the hell of Windows.</li>
<li><em>Browser</em>: <a href='http://getfirefox.com/'>Firefox</a>. On a Mac, <a href='http://www.caminobrowser.org/'>Camino</a>.</li>
<li><em>Browser</em>: <a href="http://getfirefox.com/">Firefox</a>. On a Mac, <a href="http://www.caminobrowser.org/">Camino</a>.</li>
<li><em>Email</em>: <a href='http://gmail.com/'>GMail</a>, &#8220;search, don&#8217;t sort&#8221; really works.</li>
<li><em>Email</em>: <a href="http://gmail.com/">GMail</a>, &#8220;search, don&#8217;t sort&#8221; really works.</li>
<li><em>Text Editor</em>: <a href='http://www.apple.com/getamac/'>TextMate</a>, you have to buy it, but it&#8217;s worth every penny. There are rumours that it&#8217;s been converting (recovering) Emacs users (addicts). Unfortunately, it&#8217;s Mac only. An alternative is <a href='http://www.jedit.org/'>jedit</a> (GPL, Java).</li>
<li><em>Text Editor</em>: <a href="http://www.apple.com/getamac/">TextMate</a>, you have to buy it, but it&#8217;s worth every penny. There are rumours that it&#8217;s been converting (recovering) Emacs users (addicts). Unfortunately, it&#8217;s Mac only. An alternative is <a href="http://www.jedit.org/">jedit</a> (GPL, Java).</li>
</ul>
<h3 id='development'>Development</h3>
<h3 id="development_2">Development</h3>
<ul>
<li>
<p><em>Build system</em>: <a href='http://www.cmake.org/'>cmake</a>, throw the <a href='http://sources.redhat.com/autobook/'>autotools</a> away.</p>
<p><em>Build system</em>: <a href="http://www.cmake.org/">cmake</a>, throw the <a href="http://sources.redhat.com/autobook/">autotools</a> away.</p>
</li>
<li>
<p><em>Source code control system</em>: ditch CVS for <a href='http://subversion.tigris.org'>subversion</a>.</p>
<p><em>Source code control system</em>: ditch CVS for <a href="http://subversion.tigris.org">subversion</a>.</p>
</li>
<li>
<p><em>Project management</em>: <a href='http://trac.edgewall.org/'>Trac</a> tracks everything.</p>
<p><em>Project management</em>: <a href="http://trac.edgewall.org/">Trac</a> tracks everything.</p>
</li>
<li>
<p><em>Scripting language</em>: <a href='http://www.ruby-lang.org/'>Ruby</a> is Japanese pragmatism (and has a <a href='http://poignantguide.net/ruby/'>poignant</a> guide). Python, you say? Python is too academic and snob:</p>
<p><em>Scripting language</em>: <a href="http://www.ruby-lang.org/">Ruby</a> is Japanese pragmatism (and has a <a href="http://poignantguide.net/ruby/">poignant</a> guide). Python, you say? Python is too academic and snob:</p>
<pre><code>$ python
Python 2.4.1 (\#1, Jun 4 2005, 00:54:33)
Type &quot;help&quot;, &quot;copyright&quot;, &quot;credits&quot; or &quot;license&quot; for more information.
Type "help", "copyright", "credits" or "license" for more information.
&gt;&gt;&gt; exit
&#39;Use Ctrl-D (i.e. EOF) to exit.&#39;
'Use Ctrl-D (i.e. EOF) to exit.'
&gt;&gt;&gt; quit
&#39;Use Ctrl-D (i.e. EOF) to exit.&#39;</code></pre>
'Use Ctrl-D (i.e. EOF) to exit.'</code></pre>
</li>
<li>
<p><em>Java IDE</em>: <a href='http://www.borland.com/us/products/jbuilder/index.html'>JBuilder</a> is great software and has a free version (IMHO better than Eclipse). Java is not a pain anymore since it gained <a href='http://java.sun.com/j2se/1.5.0/docs/guide/language/generics.html'>generics</a> and got opensourced.</p>
<p><em>Java IDE</em>: <a href="http://www.borland.com/us/products/jbuilder/index.html">JBuilder</a> is great software and has a free version (IMHO better than Eclipse). Java is not a pain anymore since it gained <a href="http://java.sun.com/j2se/1.5.0/docs/guide/language/generics.html">generics</a> and got opensourced.</p>
</li>
<li>
<p><em>Mark-up language</em>: HTML is so 2001, why don&#8217;t you take at look at <a href='http://en.wikipedia.org/wiki/Markdown'>Markdown</a>? <a href='data/misc_markdown.png'>Look at the source of this page</a>.</p>
<p><em>Mark-up language</em>: HTML is so 2001, why don&#8217;t you take at look at <a href="http://en.wikipedia.org/wiki/Markdown">Markdown</a>? <a href="data/misc_markdown.png">Look at the source of this page</a>.</p>
</li>
<li>
<p><em>C++ libraries</em>: * <a href='http://www.trolltech.no/'>QT</a> for GUIs. * <a href='http://www.gnu.org/software/gsl/'>GSL</a> for math. * <a href='http://www.imagemagick.org/Magick++/'>Magick++</a> for manipulating images. * <a href='http://cairographics.org/'>Cairo</a> for creating PDFs. * <a href='http://www.boost.org/'>Boost</a> for just about everything else.</p>
<p><em>C++ libraries</em>: * <a href="http://www.trolltech.no/">QT</a> for GUIs. * <a href="http://www.gnu.org/software/gsl/">GSL</a> for math. * <a href="http://www.imagemagick.org/Magick++/">Magick++</a> for manipulating images. * <a href="http://cairographics.org/">Cairo</a> for creating PDFs. * <a href="http://www.boost.org/">Boost</a> for just about everything else.</p>
</li>
</ul>
<h3 id='research'>Research</h3>
<h3 id="research_3">Research</h3>
<ul>
<li><em>Writing papers</em>: <a href='http://en.wikipedia.org/wiki/LaTeX'>LaTeX</a></li>
<li><em>Writing papers</em>: <a href="http://en.wikipedia.org/wiki/LaTeX">LaTeX</a></li>
<li><em>Writing papers &amp; enjoying the process</em>: <a href='http://www.lyx.org'>LyX</a></li>
<li><em>Writing papers &amp; enjoying the process</em>: <a href="http://www.lyx.org">LyX</a></li>
<li><em>Handsome figures in your papers</em>: <a href='http://www.xfig.org/'>xfig</a> or, better, <a href='http://tams-www.informatik.uni-hamburg.de/applets/jfig/'>jfig</a>.</li>
<li><em>Handsome figures in your papers</em>: <a href="http://www.xfig.org/">xfig</a> or, better, <a href="http://tams-www.informatik.uni-hamburg.de/applets/jfig/">jfig</a>.</li>
<li><em>The occasional presentation with many graphical content</em>: <a href='http://www.openoffice.org/product/impress.html'>OpenOffice Impress</a> (using the <a href='http://ooolatex.sourceforge.net/'>OOOlatex plugin</a>); the alternative is PowerPoint with the <a href='http://texpoint.necula.org/'>TexPoint</a> plugin.</li>
<li><em>The occasional presentation with many graphical content</em>: <a href="http://www.openoffice.org/product/impress.html">OpenOffice Impress</a> (using the <a href="http://ooolatex.sourceforge.net/">OOOlatex plugin</a>); the alternative is PowerPoint with the <a href="http://texpoint.necula.org/">TexPoint</a> plugin.</li>
<li><em>Managing BibTeX</em>: <a href='http://jabref.sourceforge.net/'>jabref</a>: multi-platform, for all your bibtex needs.</li>
<li><em>Managing BibTeX</em>: <a href="http://jabref.sourceforge.net/">jabref</a>: multi-platform, for all your bibtex needs.</li>
<li><em>IEEExplore and BibTeX</em>: convert citations using <a href='http://www.bibconverter.net/ieeexplore/'>BibConverter</a>.</li>
<li><em>IEEExplore and BibTeX</em>: convert citations using <a href="http://www.bibconverter.net/ieeexplore/">BibConverter</a>.</li>
</ul>
<h3 id='cool_websites'>Cool websites</h3>
<h3 id="cool_websites_4">Cool websites</h3>
<ul>
<li><em>Best site in the wwworld</em>: <a href='http://en.wikipedia.org/'>Wikipedia</a></li>
<li><em>Best site in the wwworld</em>: <a href="http://en.wikipedia.org/">Wikipedia</a></li>
<li><a href='http://www.mutopiaproject.org/'>Mutopia</a> for sheet music; <a href='http://www.gutenberg.org/'>the Gutenberg Project</a> for books; <a href='http://www.liberliber.it/'>LiberLiber</a> for books in italian.</li>
<li><a href="http://www.mutopiaproject.org/">Mutopia</a> for sheet music; <a href="http://www.gutenberg.org/">the Gutenberg Project</a> for books; <a href="http://www.liberliber.it/">LiberLiber</a> for books in italian.</li>
<li><em>Blogs</em>: <a href='http://bloglines.com/'>Bloglines</a></li>
<li><em>Blogs</em>: <a href="http://bloglines.com/">Bloglines</a></li>
<li><em>Sharing photos</em>: <a href='http://www.flickr.com/'>flickr</a> exposes an API you can use.</li>
<li><em>Sharing photos</em>: <a href="http://www.flickr.com/">flickr</a> exposes an API you can use.</li>
</ul>
*** Output of to_latex ***
\hypertarget{general}{}\subsubsection*{{General}}\label{general}
\hypertarget{general_1}{}\subsubsection*{{General}}\label{general_1}
\begin{itemize}%
\item \emph{Operating System} : \href{http://www.apple.com/getamac/}{Mac OS X}: heaven, after the purgatory of Linux and the hell of Windows.
@ -422,7 +422,7 @@ Type &quot;help&quot;, &quot;copyright&quot;, &quot;credits&quot; or &quot;licen
\item \emph{Text Editor}: \href{http://www.apple.com/getamac/}{TextMate}, you have to buy it, but it'{}s worth every penny. There are rumours that it'{}s been converting (recovering) Emacs users (addicts). Unfortunately, it'{}s Mac only. An alternative is \href{http://www.jedit.org/}{jedit} (GPL, Java).
\end{itemize}
\hypertarget{development}{}\subsubsection*{{Development}}\label{development}
\hypertarget{development_2}{}\subsubsection*{{Development}}\label{development_2}
\begin{itemize}%
\item \emph{Build system}: \href{http://www.cmake.org/}{cmake}, throw the \href{http://sources.redhat.com/autobook/}{autotools} away.
@ -455,7 +455,7 @@ Type "help", "copyright", "credits" or "license" for more information.
\end{itemize}
\hypertarget{research}{}\subsubsection*{{Research}}\label{research}
\hypertarget{research_3}{}\subsubsection*{{Research}}\label{research_3}
\begin{itemize}%
\item \emph{Writing papers}: \href{http://en.wikipedia.org/wiki/LaTeX}{LaTeX}
@ -466,7 +466,7 @@ Type "help", "copyright", "credits" or "license" for more information.
\item \emph{IEEExplore and BibTeX}: convert citations using \href{http://www.bibconverter.net/ieeexplore/}{BibConverter}.
\end{itemize}
\hypertarget{cool_websites}{}\subsubsection*{{Cool websites}}\label{cool_websites}
\hypertarget{cool_websites_4}{}\subsubsection*{{Cool websites}}\label{cool_websites_4}
\begin{itemize}%
\item \emph{Best site in the wwworld}: \href{http://en.wikipedia.org/}{Wikipedia}
@ -523,15 +523,3 @@ LiberLiberfor books in italian.
API you can use.
*** Output of to_s ***
GeneralOperating System : Mac OS X: heaven, after the purgatory of Linux and the hell of Windows.Browser: Firefox. On a Mac, Camino.Email: GMail, search, dont sort really works.Text Editor: TextMate, you have to buy it, but its worth every penny. There are rumours that its been converting (recovering) Emacs users (addicts). Unfortunately, its Mac only. An alternative is jedit (GPL, Java).DevelopmentBuild system: cmake, throw the autotools away.Source code control system: ditch CVS for subversion.Project management: Trac tracks everything.Scripting language: Ruby is Japanese pragmatism (and has a poignant guide). Python, you say? Python is too academic and snob:Java IDE: JBuilder is great software and has a free version (IMHO better than Eclipse). Java is not a pain anymore since it gained generics and got opensourced.Mark-up language: HTML is so 2001, why dont you take at look at Markdown? Look at the source of this page.C++ libraries: * QT for GUIs. * GSL for math. * Magick++ for manipulating images. * Cairo for creating PDFs. * Boost for just about everything else.ResearchWriting papers: LaTeXWriting papers & enjoying the process: LyXHandsome figures in your papers: xfig or, better, jfig.The occasional presentation with many graphical content: OpenOffice Impress (using the OOOlatex plugin); the alternative is PowerPoint with the TexPoint plugin.Managing BibTeX: jabref: multi-platform, for all your bibtex needs.IEEExplore and BibTeX: convert citations using BibConverter.Cool websitesBest site in the wwworld: WikipediaMutopia for sheet music; the Gutenberg Project for books; LiberLiber for books in italian.Blogs: BloglinesSharing photos: flickr exposes an API you can use.
*** EOF ***
OK!
*** Output of Markdown.pl ***
(not used anymore)
*** Output of Markdown.pl (parsed) ***
(not used anymore)

View File

@ -19,15 +19,3 @@ md_el(:document,[md_par([md_code("\\\\")]), md_par([md_code("\\")])],{},[])
*** Output of to_s ***
*** EOF ***
OK!
*** Output of Markdown.pl ***
(not used anymore)
*** Output of Markdown.pl (parsed) ***
(not used anymore)

View File

@ -25,27 +25,27 @@ md_el(:document,[
*** Output of to_html ***
<p>Paragraph</p>
<h3 id='header'>header</h3>
<h3 id="header_1">header</h3>
<p>Paragraph</p>
<h2 id='header'>header</h2>
<h2 id="header_2">header</h2>
<p>Paragraph</p>
<h1 id='header'>header</h1>
<h1 id="header_3">header</h1>
*** Output of to_latex ***
Paragraph
\hypertarget{header}{}\subsubsection*{{header}}\label{header}
\hypertarget{header_1}{}\subsubsection*{{header}}\label{header_1}
Paragraph
\hypertarget{header}{}\subsection*{{header}}\label{header}
\hypertarget{header_2}{}\subsection*{{header}}\label{header_2}
Paragraph
\hypertarget{header}{}\section*{{header}}\label{header}
\hypertarget{header_3}{}\section*{{header}}\label{header_3}
*** Output of to_md ***
Paragraph
@ -56,15 +56,3 @@ headerParagraph
header
*** Output of to_s ***
ParagraphheaderParagraphheaderParagraphheader
*** EOF ***
OK!
*** Output of Markdown.pl ***
(not used anymore)
*** Output of Markdown.pl (parsed) ***
(not used anymore)

View File

@ -16,15 +16,3 @@ md_el(:document,[md_par([md_code("There is a literal backtick (`) here.")])],{},
*** Output of to_s ***
*** EOF ***
OK!
*** Output of Markdown.pl ***
(not used anymore)
*** Output of Markdown.pl (parsed) ***
(not used anymore)

View File

@ -74,9 +74,9 @@ md_el(:document,[
<p>Paragraph (1 space after), list with no space: * ciao</p>
<p>Paragraph (2 spaces after), list with no space:<br />* ciao</p>
<p>Paragraph (2 spaces after), list with no space:<br/>* ciao</p>
<p>Paragraph (3 spaces after), list with no space: <br />* ciao</p>
<p>Paragraph (3 spaces after), list with no space: <br/>* ciao</p>
<p>Paragraph with block quote:</p>
@ -86,11 +86,11 @@ md_el(:document,[
<p>Paragraph with header:</p>
<h3 id='header'>header</h3>
<h3 id="header_1">header</h3>
<p>Paragraph with header on two lines:</p>
<h2 id='header'>header</h2>
<h2 id="header_2">header</h2>
*** Output of to_latex ***
Paragraph, list with no space: * ciao
@ -117,11 +117,11 @@ Quoted
\end{quote}
Paragraph with header:
\hypertarget{header}{}\subsubsection*{{header}}\label{header}
\hypertarget{header_1}{}\subsubsection*{{header}}\label{header_1}
Paragraph with header on two lines:
\hypertarget{header}{}\subsection*{{header}}\label{header}
\hypertarget{header_2}{}\subsection*{{header}}\label{header_2}
*** Output of to_md ***
Paragraph, list with no space: * ciao
@ -155,15 +155,3 @@ headerParagraph with header on two lines:
header
*** Output of to_s ***
Paragraph, list with no space: * ciaoParagraph, list with 1 space: * ciaoParagraph, list with 3 space: * ciaoParagraph, list with 4 spaces: * ciaoParagraph, list with 1 tab: * ciaoParagraph (1 space after), list with no space: * ciaoParagraph (2 spaces after), list with no space:* ciaoParagraph (3 spaces after), list with no space: * ciaoParagraph with block quote:QuotedParagraph with header:headerParagraph with header on two lines:header
*** EOF ***
OK!
*** Output of Markdown.pl ***
(not used anymore)
*** Output of Markdown.pl (parsed) ***
(not used anymore)

View File

@ -43,15 +43,3 @@ This is a list:
3. three
*** Output of to_s ***
This is a list:onetwothree
*** EOF ***
OK!
*** Output of Markdown.pl ***
(not used anymore)
*** Output of Markdown.pl (parsed) ***
(not used anymore)

View File

@ -13,15 +13,3 @@ One line
One line
*** Output of to_s ***
One line
*** EOF ***
OK!
*** Output of Markdown.pl ***
(not used anymore)
*** Output of Markdown.pl (parsed) ***
(not used anymore)

View File

@ -14,15 +14,3 @@ Paragraph
Paragraph
*** Output of to_s ***
Paragraph
*** EOF ***
OK!
*** Output of Markdown.pl ***
(not used anymore)
*** Output of Markdown.pl (parsed) ***
(not used anymore)

View File

@ -40,15 +40,3 @@ Paragraph
Paragraph
*** Output of to_s ***
ParagraphParagraphParagraph
*** EOF ***
OK!
*** Output of Markdown.pl ***
(not used anymore)
*** Output of Markdown.pl (parsed) ***
(not used anymore)

View File

@ -22,15 +22,3 @@ Paragraph1
Paragraph2
*** Output of to_s ***
Paragraph1Paragraph2
*** EOF ***
OK!
*** Output of Markdown.pl ***
(not used anymore)
*** Output of Markdown.pl (parsed) ***
(not used anymore)

View File

@ -28,7 +28,7 @@ md_el(:document,[
<p>Paragraph 2</p>
<p>Paragraph 3 Paragraph 4 Paragraph Br-&gt;<br />Paragraph 5</p>
<p>Paragraph 3 Paragraph 4 Paragraph Br-&gt;<br/>Paragraph 5</p>
*** Output of to_latex ***
Paragraph 1
@ -44,15 +44,3 @@ Paragraph 3 Paragraph 4 Paragraph Br->
Paragraph 5
*** Output of to_s ***
Paragraph 1Paragraph 2Paragraph 3 Paragraph 4 Paragraph Br->Paragraph 5
*** EOF ***
OK!
*** Output of Markdown.pl ***
(not used anymore)
*** Output of Markdown.pl (parsed) ***
(not used anymore)

View File

@ -13,15 +13,3 @@ md_el(:document,[md_el(:code,[],{:raw_code=>"@articles.map(&:title)"},[])],{},[]
*** Output of to_s ***
*** EOF ***
OK!
*** Output of Markdown.pl ***
(not used anymore)
*** Output of Markdown.pl (parsed) ***
(not used anymore)

View File

@ -21,8 +21,8 @@ md_el(:document,[
],{:align=>[:left, :left, :left]},[])
],{},[])
*** Output of to_html ***
<table><thead><tr><th /><th>1</th><th>2</th></tr></thead><tbody><tr><td style='text-align: left;'>A</td><td style='text-align: left;'>X</td><td style='text-align: left;' />
</tr><tr><td style='text-align: left;'>B</td><td style='text-align: left;' /><td style='text-align: left;'>X</td>
<table><thead><tr><th/><th>1</th><th>2</th></tr></thead><tbody><tr><td style="text-align: left;">A</td><td style="text-align: left;">X</td><td style="text-align: left;"/>
</tr><tr><td style="text-align: left;">B</td><td style="text-align: left;"/><td style="text-align: left;">X</td>
</tr></tbody></table>
*** Output of to_latex ***
\begin{tabular}{l|l|l}
@ -35,15 +35,3 @@ B&&X\\
12AXBX
*** Output of to_s ***
12AXBX
*** EOF ***
OK!
*** Output of Markdown.pl ***
(not used anymore)
*** Output of Markdown.pl (parsed) ***
(not used anymore)

View File

@ -32,21 +32,21 @@ md_el(:document,[
md_el(:code,[],{:raw_code=>"<a@invalid.it>"},[])
],{},[])
*** Output of to_html ***
<p><a href='http://www.aa.com'>http://www.aa.com</a></p>
<p><a href="http://www.aa.com">http://www.aa.com</a></p>
<p><a href='http://www.bb.com'>http://www.bb.com</a></p>
<p><a href="http://www.bb.com">http://www.bb.com</a></p>
<p><a href='http://www.cc.com'>http://www.cc.com</a></p>
<p><a href="http://www.cc.com">http://www.cc.com</a></p>
<p><a href='http://www.dd.com'>http://www.dd.com</a></p>
<p><a href="http://www.dd.com">http://www.dd.com</a></p>
<pre><code>&lt;http://www.dd.com&gt;</code></pre>
<p><a href='mailto:a@invalid.it'>&#097;&#064;&#105;&#110;&#118;&#097;&#108;&#105;&#100;&#046;&#105;&#116;</a></p>
<p><a href="mailto:a@invalid.it">&#097;&#064;&#105;&#110;&#118;&#097;&#108;&#105;&#100;&#046;&#105;&#116;</a></p>
<p><a href='mailto:a@invalid.it'>&#097;&#064;&#105;&#110;&#118;&#097;&#108;&#105;&#100;&#046;&#105;&#116;</a></p>
<p><a href="mailto:a@invalid.it">&#097;&#064;&#105;&#110;&#118;&#097;&#108;&#105;&#100;&#046;&#105;&#116;</a></p>
<p><a href='mailto:a@invalid.it'>&#097;&#064;&#105;&#110;&#118;&#097;&#108;&#105;&#100;&#046;&#105;&#116;</a></p>
<p><a href="mailto:a@invalid.it">&#097;&#064;&#105;&#110;&#118;&#097;&#108;&#105;&#100;&#046;&#105;&#116;</a></p>
<pre><code>&lt;a@invalid.it&gt;</code></pre>
*** Output of to_latex ***
@ -70,15 +70,3 @@ md_el(:document,[
*** Output of to_s ***
*** EOF ***
OK!
*** Output of Markdown.pl ***
(not used anymore)
*** Output of Markdown.pl (parsed) ***
(not used anymore)

View File

@ -12,22 +12,10 @@ md_el(:document,[
md_ref_def("a_b", "http://site.com/", {:title=>nil})
],{},[])
*** Output of to_html ***
<p><a href='http://site.com/'>a. b</a> is a link.</p>
<p><a href="http://site.com/">a. b</a> is a link.</p>
*** Output of to_latex ***
\href{http://site.com/}{a. b} is a link.
*** Output of to_md ***
a. bis a link.
*** Output of to_s ***
a. b is a link.
*** EOF ***
OK!
*** Output of Markdown.pl ***
(not used anymore)
*** Output of Markdown.pl (parsed) ***
(not used anymore)

View File

@ -13,15 +13,3 @@ Search on Google images
Search on Google images
*** Output of to_s ***
Search on Google images
*** EOF ***
OK!
*** Output of Markdown.pl ***
(not used anymore)
*** Output of Markdown.pl (parsed) ***
(not used anymore)

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,32 @@
I'm not sure if this should work at all...
*** Parameters: ***
{} # params
*** Markdown input: ***
Ciao
* Tab
* Tab
* Tab
*** Output of inspect ***
nil
*** Output of to_html ***
<p>Ciao</p>
<ul>
<li>Tab * Tab * Tab</li>
</ul>
*** Output of to_latex ***
Ciao
\begin{itemize}%
\item Tab * Tab * Tab
\end{itemize}
*** Output of to_md ***
Ciao
-ab * Tab * Tab
*** Output of to_s ***
CiaoTab * Tab * Tab

View File

@ -0,0 +1,65 @@
Test case given by Scott.
http://rubyforge.org/tracker/index.php?func=detail&aid=8862&group_id=2795&atid=10735
a should not be indented.
*** Parameters: ***
{} # params
*** Markdown input: ***
* a
* a1
* a2
* b
*** Output of inspect ***
md_el(:document,[
md_el(:ul,[
md_el(:li,[
"a",
md_el(:ul,[
md_el(:li_span,["a1"],{:want_my_paragraph=>false},[]),
md_el(:li_span,["a2"],{:want_my_paragraph=>false},[])
],{},[])
],{:want_my_paragraph=>true},[]),
md_el(:li,[md_par(["b"])],{:want_my_paragraph=>false},[])
],{},[])
],{},[])
*** Output of to_html ***
<ul>
<li>
a
<ul>
<li>a1</li>
<li>a2</li>
</ul>
</li>
<li>
<p>b</p>
</li>
</ul>
*** Output of to_latex ***
\begin{itemize}%
\item a
\begin{itemize}%
\item a1
\item a2
\end{itemize}
\item b
\end{itemize}
*** Output of to_md ***
-* a1
* a2
-
*** Output of to_s ***
aa1a2b

View File

@ -40,37 +40,3 @@ Here is a paragraph.
-tem 3
*** Output of to_s ***
Here is a paragraph.Item 1Item 2Item 3
*** EOF ***
Failed tests: [:inspect, :to_html, :to_md, :to_s]
*** Output of inspect ***
-----| WARNING | -----
md_el(:document,[
md_par(["Here is a paragraph."]),
md_par(["* Item 1 * Item 2 * Item 3"])
],{},[])
*** Output of to_html ***
-----| WARNING | -----
<p>Here is a paragraph.</p>
<p>* Item 1 * Item 2 * Item 3</p>
*** Output of to_latex ***
Here is a paragraph.
* Item 1 * Item 2 * Item 3
*** Output of to_md ***
-----| WARNING | -----
Here is a paragraph.
* Item 1 * Item 2 * Item 3
*** Output of to_s ***
-----| WARNING | -----
Here is a paragraph.* Item 1 * Item 2 * Item 3
*** Output of Markdown.pl ***
(not used anymore)
*** Output of Markdown.pl (parsed) ***
(not used anymore)

View File

@ -0,0 +1,23 @@
Comment
*** Parameters: ***
{}
*** Markdown input: ***
[bar]
[1].
[1]: /url/ "Title"
*** Output of inspect ***
md_el(:document,[
md_par([md_link(["bar"],"1"), "."]),
md_ref_def("1", "/url/", {:title=>"Title"})
],{},[])
*** Output of to_html ***
<p><a href='/url/' title='Title'>bar</a>.</p>
*** Output of to_latex ***
\href{/url/}{a}.
*** Output of to_md ***
[bar][1].
[1]: /url/ "Title"
*** Output of to_s ***
bar.

Some files were not shown because too many files have changed in this diff Show More