Merge branch 'bzr/golem' of /Users/distler/Sites/code/instiki
This commit is contained in:
commit
5fd725e3a8
|
@ -556,6 +556,13 @@ END_THM
|
||||||
"A <code>class SmartEngine</code> would not mark up\n\n<pre>CodeBlocks</pre>\n\nwould it?")
|
"A <code>class SmartEngine</code> would not mark up\n\n<pre>CodeBlocks</pre>\n\nwould it?")
|
||||||
end
|
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
|
# def test_content_with_autolink_in_parentheses
|
||||||
# assert_markup_parsed_as(
|
# assert_markup_parsed_as(
|
||||||
# '<p>The W3C body (<a href="http://www.w3c.org">' +
|
# '<p>The W3C body (<a href="http://www.w3c.org">' +
|
||||||
|
|
350
vendor/plugins/maruku/bin/marutest
vendored
350
vendor/plugins/maruku/bin/marutest
vendored
|
@ -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
|
|
||||||
|
|
|
@ -2,6 +2,7 @@ require 'tempfile'
|
||||||
require 'fileutils'
|
require 'fileutils'
|
||||||
require 'digest/md5'
|
require 'digest/md5'
|
||||||
require 'pstore'
|
require 'pstore'
|
||||||
|
require 'nokogiri'
|
||||||
|
|
||||||
module MaRuKu
|
module MaRuKu
|
||||||
module Out
|
module Out
|
||||||
|
@ -40,16 +41,16 @@ COMMAND
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
doc = Document.new(result, :respect_whitespace => :all)
|
doc = Nokogiri::XML::Document.parse(result)
|
||||||
png = doc.root.elements[1]
|
png = doc.root.elements.to_a[0]
|
||||||
if png.name != 'png'
|
if png.name != 'png'
|
||||||
maruku_error "Blahtex error: \n#{doc}"
|
maruku_error "Blahtex error: \n#{doc}"
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
raise "No depth element in:\n #{doc}" unless depth = png.elements['depth']
|
raise "No depth element in:\n #{doc}" unless depth = png.xpath('//depth')[0]
|
||||||
raise "No height element in:\n #{doc}" unless height = png.elements['height']
|
raise "No height element in:\n #{doc}" unless height = png.xpath('//height')[0]
|
||||||
raise "No md5 element in:\n #{doc}" unless md5 = png.elements['md5']
|
raise "No md5 element in:\n #{doc}" unless md5 = png.xpath('//md5')[0]
|
||||||
|
|
||||||
depth = depth.text.to_f
|
depth = depth.text.to_f
|
||||||
height = height.text.to_f # TODO: check != 0
|
height = height.text.to_f # TODO: check != 0
|
||||||
|
|
|
@ -25,9 +25,9 @@ module MaRuKu
|
||||||
maruku_error "Unknown itex2mml kind: #{kind}"
|
maruku_error "Unknown itex2mml kind: #{kind}"
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
d = Nokogiri::XML::Document.parse(mathml.to_utf8)
|
||||||
return Document.new(mathml.to_utf8, :respect_whitespace => :all).root
|
return d.root
|
||||||
rescue REXML::ParseException => e
|
rescue Exception => e
|
||||||
maruku_error "Invalid MathML TeX: \n#{tex.gsub(/^/, 'tex>')}\n\n #{e.inspect}"
|
maruku_error "Invalid MathML TeX: \n#{tex.gsub(/^/, 'tex>')}\n\n #{e.inspect}"
|
||||||
nil
|
nil
|
||||||
rescue
|
rescue
|
||||||
|
|
|
@ -1,15 +1,14 @@
|
||||||
module MaRuKu; module Out; module HTML
|
module MaRuKu; module Out; module HTML
|
||||||
|
|
||||||
require 'maruku/string_utils'
|
require 'maruku/string_utils'
|
||||||
|
require 'nokogiri'
|
||||||
|
|
||||||
def convert_to_mathml_none(kind, tex)
|
def convert_to_mathml_none(kind, tex)
|
||||||
# You can: either return a REXML::Element
|
# You can: either return a nokogiri::XML::Element
|
||||||
# return Element.new 'div'
|
|
||||||
# or return an empty array on error
|
# or return an empty array on error
|
||||||
# return []
|
# return []
|
||||||
# or have a string parsed by REXML:
|
|
||||||
mathml = "<code>#{html_escape(tex)}</code>"
|
mathml = "<code>#{html_escape(tex)}</code>"
|
||||||
return Document.new(mathml).root
|
return Nokogiri::XML::Document.parse(mathml).root
|
||||||
end
|
end
|
||||||
|
|
||||||
def convert_to_png_none(kind, tex)
|
def convert_to_png_none(kind, tex)
|
||||||
|
|
|
@ -38,12 +38,14 @@ Same thing as `html_math_engine`, only for PNG output.
|
||||||
|
|
||||||
=end
|
=end
|
||||||
|
|
||||||
|
require 'nokogiri'
|
||||||
|
|
||||||
module MaRuKu
|
module MaRuKu
|
||||||
module Out
|
module Out
|
||||||
module HTML
|
module HTML
|
||||||
# Creates an xml Mathml document of this node's TeX code.
|
# Creates an xml Mathml document of this node's TeX code.
|
||||||
#
|
#
|
||||||
# @return [REXML::Document]
|
# @return Nokogiri::XML::Document]
|
||||||
def render_mathml(kind, tex)
|
def render_mathml(kind, tex)
|
||||||
engine = get_setting(:html_math_engine)
|
engine = get_setting(:html_math_engine)
|
||||||
method = "convert_to_mathml_#{engine}"
|
method = "convert_to_mathml_#{engine}"
|
||||||
|
@ -77,6 +79,7 @@ module MaRuKu
|
||||||
end
|
end
|
||||||
|
|
||||||
def adjust_png(png, use_depth)
|
def adjust_png(png, use_depth)
|
||||||
|
d = Nokogiri::XML::Document.new
|
||||||
src = png.src
|
src = png.src
|
||||||
|
|
||||||
height_in_px = png.height
|
height_in_px = png.height
|
||||||
|
@ -88,22 +91,23 @@ module MaRuKu
|
||||||
style << "vertical-align: -#{depth_in_ex}ex;" if use_depth
|
style << "vertical-align: -#{depth_in_ex}ex;" if use_depth
|
||||||
style << "height: #{total_height_in_ex}ex;"
|
style << "height: #{total_height_in_ex}ex;"
|
||||||
|
|
||||||
img = Element.new 'img'
|
img = Nokogiri::XML::Element.new('img', d)
|
||||||
img.attributes['src'] = src
|
img['src'] = src
|
||||||
img.attributes['style'] = style
|
img['style'] = style
|
||||||
img.attributes['alt'] = "$#{self.math.strip}$"
|
img['alt'] = "$#{self.math.strip}$"
|
||||||
img
|
img
|
||||||
end
|
end
|
||||||
|
|
||||||
def to_html_inline_math
|
def to_html_inline_math
|
||||||
|
d = Nokogiri::XML::Document.new
|
||||||
mathml = get_setting(:html_math_output_mathml) && render_mathml(:inline, self.math)
|
mathml = get_setting(:html_math_output_mathml) && render_mathml(:inline, self.math)
|
||||||
png = get_setting(:html_math_output_png) && render_png(:inline, self.math)
|
png = get_setting(:html_math_output_png) && render_png(:inline, self.math)
|
||||||
|
|
||||||
span = create_html_element 'span'
|
span = create_html_element 'span'
|
||||||
add_class_to(span, 'maruku-inline')
|
span['class'] = 'maruku-inline'
|
||||||
|
|
||||||
if mathml
|
if mathml
|
||||||
add_class_to(mathml, 'maruku-mathml')
|
mathml['class'] = 'maruku-mathml'
|
||||||
return mathml
|
return mathml
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -117,18 +121,19 @@ module MaRuKu
|
||||||
end
|
end
|
||||||
|
|
||||||
def to_html_equation
|
def to_html_equation
|
||||||
|
d = Nokogiri::XML::Document.new
|
||||||
mathml = get_setting(:html_math_output_mathml) && render_mathml(:equation, self.math)
|
mathml = get_setting(:html_math_output_mathml) && render_mathml(:equation, self.math)
|
||||||
png = get_setting(:html_math_output_png) && render_png(:equation, self.math)
|
png = get_setting(:html_math_output_png) && render_png(:equation, self.math)
|
||||||
|
|
||||||
div = create_html_element 'div'
|
div = create_html_element 'div'
|
||||||
add_class_to(div, 'maruku-equation')
|
div['class'] = 'maruku-equation'
|
||||||
if mathml
|
if mathml
|
||||||
if self.label # then numerate
|
if self.label # then numerate
|
||||||
span = Element.new 'span'
|
span = Nokogiri::XML::Element.new('span', d)
|
||||||
span.attributes['class'] = 'maruku-eq-number'
|
span['class'] = 'maruku-eq-number'
|
||||||
span << Text.new("(#{self.num})")
|
span << Nokogiri::XML::Text.new("(#{self.num})", d)
|
||||||
div << span
|
div << span
|
||||||
div.attributes['id'] = "eq:#{self.label}"
|
div['id'] = "eq:#{self.label}"
|
||||||
end
|
end
|
||||||
add_class_to(mathml, 'maruku-mathml')
|
add_class_to(mathml, 'maruku-mathml')
|
||||||
div << mathml
|
div << mathml
|
||||||
|
@ -139,18 +144,18 @@ module MaRuKu
|
||||||
add_class_to(img, 'maruku-png')
|
add_class_to(img, 'maruku-png')
|
||||||
div << img
|
div << img
|
||||||
if self.label # then numerate
|
if self.label # then numerate
|
||||||
span = Element.new 'span'
|
span = Nokogiri::XML::Element.new('span', d)
|
||||||
span.attributes['class'] = 'maruku-eq-number'
|
span['class'] = 'maruku-eq-number'
|
||||||
span << Text.new("(#{self.num})")
|
span << Nokogiri::XML::Text.new("(#{self.num})", d)
|
||||||
div << span
|
div << span
|
||||||
div.attributes['id'] = "eq:#{self.label}"
|
div['id'] = "eq:#{self.label}"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
source_span = Element.new 'span'
|
source_span = Nokogiri::XML::Element.new('span', d)
|
||||||
add_class_to(source_span, 'maruku-eq-tex')
|
add_class_to(source_span, 'maruku-eq-tex')
|
||||||
code = convert_to_mathml_none(:equation, self.math.strip)
|
code = convert_to_mathml_none(:equation, self.math.strip)
|
||||||
code.attributes['style'] = 'display: none'
|
code['style'] = 'display: none'
|
||||||
source_span << code
|
source_span << code
|
||||||
div << source_span
|
div << source_span
|
||||||
|
|
||||||
|
@ -158,29 +163,31 @@ module MaRuKu
|
||||||
end
|
end
|
||||||
|
|
||||||
def to_html_eqref
|
def to_html_eqref
|
||||||
|
d = Nokogiri::XML::Document.new
|
||||||
unless eq = self.doc.eqid2eq[self.eqid]
|
unless eq = self.doc.eqid2eq[self.eqid]
|
||||||
maruku_error "Cannot find equation #{self.eqid.inspect}"
|
maruku_error "Cannot find equation #{self.eqid.inspect}"
|
||||||
return Text.new("(eq:#{self.eqid})")
|
return Nokogiri::XML::Text.new("(eq:#{self.eqid})", d)
|
||||||
end
|
end
|
||||||
|
|
||||||
a = Element.new 'a'
|
a = Nokogiri::XML::Element.new('a', d)
|
||||||
a.attributes['class'] = 'maruku-eqref'
|
a['class'] = 'maruku-eqref'
|
||||||
a.attributes['href'] = "#eq:#{self.eqid}"
|
a['href'] = "#eq:#{self.eqid}"
|
||||||
a << Text.new("(#{eq.num})")
|
a << Nokogiri::XML::Text.new("(#{eq.num})", d)
|
||||||
a
|
a
|
||||||
end
|
end
|
||||||
|
|
||||||
def to_html_divref
|
def to_html_divref
|
||||||
|
d = Nokogiri::XML::Document.new
|
||||||
unless hash = self.doc.refid2ref.values.find {|h| h.has_key?(self.refid)}
|
unless hash = self.doc.refid2ref.values.find {|h| h.has_key?(self.refid)}
|
||||||
maruku_error "Cannot find div #{self.refid.inspect}"
|
maruku_error "Cannot find div #{self.refid.inspect}"
|
||||||
return Text.new("\\ref{#{self.refid}}")
|
return Nokogiri::XML::Text.new("\\ref{#{self.refid}}", d)
|
||||||
end
|
end
|
||||||
ref= hash[self.refid]
|
ref= hash[self.refid]
|
||||||
|
|
||||||
a = Element.new 'a'
|
a = Nokogiri::XML::Element.new('a', d)
|
||||||
a.attributes['class'] = 'maruku-ref'
|
a['class'] = 'maruku-ref'
|
||||||
a.attributes['href'] = "#" + self.refid
|
a['href'] = "#" + self.refid
|
||||||
a << Text.new(ref.num.to_s)
|
a << Nokogiri::XML::Text.new(ref.num.to_s, d)
|
||||||
a
|
a
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
9
vendor/plugins/maruku/lib/maruku/helpers.rb
vendored
9
vendor/plugins/maruku/lib/maruku/helpers.rb
vendored
|
@ -18,6 +18,9 @@
|
||||||
|
|
||||||
|
|
||||||
module MaRuKu
|
module MaRuKu
|
||||||
|
|
||||||
|
require 'nokogiri'
|
||||||
|
|
||||||
# A collection of helper functions for creating Markdown elements.
|
# A collection of helper functions for creating Markdown elements.
|
||||||
# They hide the particular internal representations.
|
# They hide the particular internal representations.
|
||||||
#
|
#
|
||||||
|
@ -80,11 +83,11 @@ module MaRuKu
|
||||||
e = md_el(:raw_html, [], :raw_html => raw_html)
|
e = md_el(:raw_html, [], :raw_html => raw_html)
|
||||||
begin
|
begin
|
||||||
e.instance_variable_set("@parsed_html",
|
e.instance_variable_set("@parsed_html",
|
||||||
REXML::Document.new("<marukuwrap>#{raw_html.strip}</marukuwrap>"))
|
Nokogiri::XML::Document.parse("<marukuwrap>#{raw_html.strip}</marukuwrap>"))
|
||||||
rescue REXML::ParseException => ex
|
rescue Nokogiri::XML::Document.errors => ex
|
||||||
e.instance_variable_set "@parsed_html", nil
|
e.instance_variable_set "@parsed_html", nil
|
||||||
maruku_recover <<ERR
|
maruku_recover <<ERR
|
||||||
REXML cannot parse this block of HTML/XML:
|
Nokogiri cannot parse this block of HTML/XML:
|
||||||
#{raw_html.gsub(/^/, '|').rstrip}
|
#{raw_html.gsub(/^/, '|').rstrip}
|
||||||
#{ex.inspect}
|
#{ex.inspect}
|
||||||
ERR
|
ERR
|
||||||
|
|
|
@ -221,12 +221,14 @@ class CharSourceStrscan
|
||||||
def shift_char; @scanner.getch[0]; end
|
def shift_char; @scanner.getch[0]; end
|
||||||
|
|
||||||
# Advance the pointer
|
# 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
|
# 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
|
def current_remaining_buffer; @scanner.rest; end
|
||||||
|
|
||||||
# Returns true if string matches what we're pointing to
|
# 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 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
|
def describe
|
||||||
len = 75
|
len = 75
|
||||||
|
|
|
@ -23,8 +23,6 @@ module MaRuKu; module In; module Markdown; module SpanLevelParser
|
||||||
|
|
||||||
# This class helps me read and sanitize HTML blocks
|
# This class helps me read and sanitize HTML blocks
|
||||||
|
|
||||||
# I tried to do this with REXML, but wasn't able to. (suggestions?)
|
|
||||||
|
|
||||||
class HTMLHelper
|
class HTMLHelper
|
||||||
include MaRuKu::Strings
|
include MaRuKu::Strings
|
||||||
|
|
||||||
|
|
|
@ -20,6 +20,7 @@
|
||||||
|
|
||||||
|
|
||||||
require 'iconv'
|
require 'iconv'
|
||||||
|
require 'nokogiri'
|
||||||
|
|
||||||
|
|
||||||
module MaRuKu; module In; module Markdown; module BlockLevelParser
|
module MaRuKu; module In; module Markdown; module BlockLevelParser
|
||||||
|
@ -184,7 +185,6 @@ Disabled by default because of security concerns.
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
include REXML
|
|
||||||
# (PHP Markdown extra) Search for elements that have
|
# (PHP Markdown extra) Search for elements that have
|
||||||
# markdown=1 or markdown=block defined
|
# markdown=1 or markdown=block defined
|
||||||
def substitute_markdown_inside_raw_html
|
def substitute_markdown_inside_raw_html
|
||||||
|
@ -195,35 +195,38 @@ Disabled by default because of security concerns.
|
||||||
block_tags = ['div']
|
block_tags = ['div']
|
||||||
|
|
||||||
# use xpath to find elements with 'markdown' attribute
|
# 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}"
|
# puts "Found #{e}"
|
||||||
# should we parse block-level or span-level?
|
# should we parse block-level or span-level?
|
||||||
|
|
||||||
how = e.attributes['markdown']
|
how = e['markdown']
|
||||||
parse_blocks = (how == 'block') || block_tags.include?(e.name)
|
parse_blocks = (how == 'block') || block_tags.include?(e.name)
|
||||||
|
|
||||||
# Select all text elements of e
|
# Select all text elements of e
|
||||||
XPath.match(e, "//text()" ).each { |original_text|
|
e.xpath("//text()").each { |original_text|
|
||||||
s = original_text.value
|
s = original_text.text
|
||||||
if s.strip.size > 0
|
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,
|
el = md_el(:dummy,
|
||||||
parse_blocks ? parse_text_as_markdown(s) :
|
parse_blocks ? parse_text_as_markdown(s) :
|
||||||
parse_lines_as_span([s]) )
|
parse_lines_as_span([s]) )
|
||||||
p = original_text.parent
|
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|
|
el.children_to_html.each do |x|
|
||||||
p.insert_before(original_text, x)
|
guard.before(x)
|
||||||
end
|
end
|
||||||
p.delete(original_text)
|
guard.remove
|
||||||
|
|
||||||
end
|
end
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
# remove 'markdown' attribute
|
# remove 'markdown' attribute
|
||||||
e.delete_attribute 'markdown'
|
e.delete('markdown')
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -818,7 +818,7 @@ SpanContext = SpanContext_String # Seems to be faster
|
||||||
s = "Elements read in span: \n" +
|
s = "Elements read in span: \n" +
|
||||||
lines.gsub(/^/, ' -')+"\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
|
s
|
||||||
end
|
end
|
||||||
end # SpanContext_String
|
end # SpanContext_String
|
||||||
|
|
|
@ -1,13 +1,7 @@
|
||||||
# This module groups all functions related to HTML export.
|
# This module groups all functions related to HTML export.
|
||||||
module MaRuKu
|
module MaRuKu
|
||||||
|
|
||||||
begin
|
require 'nokogiri'
|
||||||
require 'rexml/formatters/pretty'
|
|
||||||
require 'rexml/formatters/default'
|
|
||||||
$rexml_new_version = true
|
|
||||||
rescue LoadError
|
|
||||||
$rexml_new_version = false
|
|
||||||
end
|
|
||||||
require 'maruku/string_utils'
|
require 'maruku/string_utils'
|
||||||
|
|
||||||
class MDDocument
|
class MDDocument
|
||||||
|
@ -22,25 +16,30 @@ end
|
||||||
ie_hack = !context[:ie_hack].kind_of?(FalseClass)
|
ie_hack = !context[:ie_hack].kind_of?(FalseClass)
|
||||||
content_only = !context[:content_only].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
|
if content_only
|
||||||
body = Element.new('div', doc)
|
body = Nokogiri::XML::Element.new('div', doc)
|
||||||
else
|
else
|
||||||
html = Element.new('html', doc)
|
html = Nokogiri::XML::Element.new('html', doc)
|
||||||
html.add_namespace('http://www.w3.org/1999/xhtml')
|
doc << html
|
||||||
|
html.add_namespace(nil, 'http://www.w3.org/1999/xhtml')
|
||||||
html.add_namespace('svg', "http://www.w3.org/2000/svg" )
|
html.add_namespace('svg', "http://www.w3.org/2000/svg" )
|
||||||
|
|
||||||
head = Element.new('head', html)
|
head = Nokogiri::XML::Element.new('head', html)
|
||||||
me = Element.new 'meta', head
|
html << head
|
||||||
me.attributes['http-equiv'] = 'Content-type'
|
me = Nokogiri::XML::Element.new('meta', head)
|
||||||
me.attributes['content'] = 'text/html;charset=utf-8'
|
me['http-equiv'] = 'Content-type'
|
||||||
|
me['content'] = 'text/html;charset=utf-8'
|
||||||
|
head << meta
|
||||||
|
|
||||||
# Create title element
|
# Create title element
|
||||||
doc_title = self.attributes[:title] || self.attributes[:subject] || ""
|
doc_title = self.attributes[:title] || self.attributes[:subject] || ""
|
||||||
title = Element.new 'title', head
|
title = Nokogiri::XML::Element.new 'title', head
|
||||||
title << Text.new(doc_title)
|
title << Nokogiri::XML::Text.new(doc_title, head)
|
||||||
body = Element.new('body', html)
|
head << title
|
||||||
|
body = Nokogiri::XML::Element.new('body', html)
|
||||||
|
html << body
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -68,10 +67,11 @@ end
|
||||||
<div class='bottomright'> #{slide_bottomright}</div>
|
<div class='bottomright'> #{slide_bottomright}</div>
|
||||||
</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 = Nokogiri::XML::Element.new('div', body)
|
||||||
presentation.attributes['class'] = 'presentation'
|
presentation['class'] = 'presentation'
|
||||||
|
body << presentation
|
||||||
|
|
||||||
first_slide="
|
first_slide="
|
||||||
<div class='slide'>
|
<div class='slide'>
|
||||||
|
@ -81,19 +81,21 @@ end
|
||||||
<h4> #{self.attributes[:company] ||context[:company]}</h4>
|
<h4> #{self.attributes[:company] ||context[:company]}</h4>
|
||||||
</div>
|
</div>
|
||||||
"
|
"
|
||||||
presentation.add_element Document.new(first_slide).root
|
presentation << Nokogiri::XML::Document.parse(first_slide).root
|
||||||
|
|
||||||
slide_num = 0
|
slide_num = 0
|
||||||
self.toc.section_children.each do |slide|
|
self.toc.section_children.each do |slide|
|
||||||
slide_num += 1
|
slide_num += 1
|
||||||
@doc.attributes[:doc_prefix] = "s#{slide_num}"
|
@doc.attributes[:doc_prefix] = "s#{slide_num}"
|
||||||
|
|
||||||
puts "Slide #{slide_num}: " + slide.header_element.to_s
|
# puts "Slide #{slide_num}: " + slide.header_element.to_s
|
||||||
div = Element.new('div', presentation)
|
div = Nokogiri::XML::Element.new('div', presentation)
|
||||||
div.attributes['class'] = 'slide'
|
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
|
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
|
array_to_html(slide.immediate_children).each do |e| div << e end
|
||||||
|
|
||||||
|
@ -104,23 +106,15 @@ end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
xml = ""
|
|
||||||
if (content_only)
|
if (content_only)
|
||||||
if $rexml_new_version
|
xml = body.to_xml(:indent => (context[:indent] || 2), :save_with => 2 )
|
||||||
formatter = REXML::Formatters::Default.new(ie_hack)
|
|
||||||
formatter.write(body, xml)
|
|
||||||
else
|
else
|
||||||
body.write(xml,indent,transitive=true,ie_hack);
|
doc2 = Nokogiri::XML::Document.parse("<div>"+S5_external+"</div>")
|
||||||
end
|
|
||||||
else
|
|
||||||
doc2 = Document.new("<div>"+S5_external+"</div>",{:respect_whitespace =>:all})
|
|
||||||
doc2.root.children.each{ |child| head << child }
|
doc2.root.children.each{ |child| head << child }
|
||||||
|
|
||||||
add_css_to(head)
|
add_css_to(head)
|
||||||
|
|
||||||
# REXML Bug? if indent!=-1 whitespace is not respected for 'pre' elements
|
xml = html.to_xml(:indent => (context[:indent] || 2), :save_with => 2 )
|
||||||
# containing code.
|
|
||||||
html.write(xml,indent,transitive=true,ie_hack);
|
|
||||||
Xhtml11_mathml2_svg11 + xml
|
Xhtml11_mathml2_svg11 + xml
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
321
vendor/plugins/maruku/lib/maruku/output/to_html.rb
vendored
321
vendor/plugins/maruku/lib/maruku/output/to_html.rb
vendored
|
@ -18,63 +18,37 @@
|
||||||
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
#++
|
#++
|
||||||
|
|
||||||
require 'rexml/document'
|
require 'nokogiri'
|
||||||
|
require 'maruku/string_utils'
|
||||||
begin
|
|
||||||
require 'rexml/formatters/pretty'
|
|
||||||
require 'rexml/formatters/default'
|
|
||||||
$rexml_new_version = true
|
|
||||||
rescue LoadError
|
|
||||||
$rexml_new_version = false
|
|
||||||
end
|
|
||||||
|
|
||||||
class String
|
class String
|
||||||
# A string is rendered into HTML by creating
|
# 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
|
def to_html
|
||||||
REXML::Text.new(self)
|
d = Nokogiri::XML::Document.new
|
||||||
|
Nokogiri::XML::Text.new(self, d)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
# This module groups all functions related to HTML export.
|
# This module groups all functions related to HTML export.
|
||||||
module MaRuKu; module Out; module HTML
|
module MaRuKu; module Out; module HTML
|
||||||
include REXML
|
|
||||||
|
|
||||||
# Render as an HTML fragment (no head, just the content of BODY). (returns a string)
|
# Render as an HTML fragment (no head, just the content of BODY). (returns a string)
|
||||||
def to_html(context={})
|
def to_html(context={})
|
||||||
indent = context[:indent] || -1
|
d = Nokogiri::XML::Document.parse('<dummy/>')
|
||||||
ie_hack = context[:ie_hack] || true
|
|
||||||
|
|
||||||
div = Element.new 'dummy'
|
|
||||||
children_to_html.each do |e|
|
children_to_html.each do |e|
|
||||||
div << e
|
d.root << e
|
||||||
end
|
end
|
||||||
|
|
||||||
# render footnotes
|
# render footnotes
|
||||||
if @doc.footnotes_order.size > 0
|
if @doc.footnotes_order.size > 0
|
||||||
div << render_footnotes
|
d.root << render_footnotes
|
||||||
end
|
end
|
||||||
|
|
||||||
doc = Document.new(nil,{:respect_whitespace =>:all})
|
xml = d.to_xml(:indent => (context[:indent] || 2), :save_with => 2 )
|
||||||
doc << div
|
|
||||||
|
|
||||||
# REXML Bug? if indent!=-1 whitespace is not respected for 'pre' elements
|
xml.gsub!(/\A<dummy>\s*|\s*<\/dummy>\s*\Z|\A<dummy\s*\/>/,'')
|
||||||
# containing code.
|
|
||||||
xml =""
|
|
||||||
|
|
||||||
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
|
xml
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -85,9 +59,7 @@ module MaRuKu; module Out; module HTML
|
||||||
doc = to_html_document_tree
|
doc = to_html_document_tree
|
||||||
xml = ""
|
xml = ""
|
||||||
|
|
||||||
# REXML Bug? if indent!=-1 whitespace is not respected for 'pre' elements
|
xml = doc.to_xml(:indent => (context[:indent] || 2), :save_with => 2 )
|
||||||
# containing code.
|
|
||||||
doc.write(xml,indent,transitive=true,ie_hack);
|
|
||||||
|
|
||||||
Xhtml11_mathml2_svg11 + xml
|
Xhtml11_mathml2_svg11 + xml
|
||||||
end
|
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
|
=begin maruku_doc
|
||||||
|
@ -155,10 +130,11 @@ Synonim for `title`.
|
||||||
=end
|
=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
|
def to_html_tree
|
||||||
div = Element.new 'div'
|
d = Nokogiri::XML::Document.new
|
||||||
div.attributes['class'] = 'maruku_wrapper_div'
|
div = Nokogiri::XML::Element.new('dummy', d)
|
||||||
|
div['class'] = 'maruku_wrapper_div'
|
||||||
children_to_html.each do |e|
|
children_to_html.each do |e|
|
||||||
div << e
|
div << e
|
||||||
end
|
end
|
||||||
|
@ -168,8 +144,7 @@ Synonim for `title`.
|
||||||
div << render_footnotes
|
div << render_footnotes
|
||||||
end
|
end
|
||||||
|
|
||||||
doc = Document.new(nil,{:respect_whitespace =>:all})
|
d << div
|
||||||
doc << div
|
|
||||||
end
|
end
|
||||||
|
|
||||||
=begin maruku_doc
|
=begin maruku_doc
|
||||||
|
@ -188,56 +163,59 @@ Example:
|
||||||
|
|
||||||
METAS = %w{description keywords author revised}
|
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
|
def to_html_document_tree
|
||||||
doc = Document.new(nil,{:respect_whitespace =>:all})
|
doc = Nokogiri::XML::Document.new
|
||||||
# doc << XMLDecl.new
|
|
||||||
|
|
||||||
root = Element.new('html', doc)
|
root = Nokogiri::XML::Element.new('html', doc)
|
||||||
root.add_namespace('http://www.w3.org/1999/xhtml')
|
root.add_namespace(nil, 'http://www.w3.org/1999/xhtml')
|
||||||
root.add_namespace('svg', "http://www.w3.org/2000/svg" )
|
root.add_namespace('svg', "http://www.w3.org/2000/svg" )
|
||||||
lang = self.attributes[:lang] || 'en'
|
lang = self[:lang] || 'en'
|
||||||
root.attributes['xml:lang'] = lang
|
root['xml:lang'] = lang
|
||||||
|
doc << root
|
||||||
|
|
||||||
root << xml_newline
|
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">
|
#<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8">
|
||||||
me = Element.new 'meta', head
|
me = Nokogiri::XML::Element.new('meta', doc)
|
||||||
me.attributes['http-equiv'] = 'Content-type'
|
me['http-equiv'] = 'Content-type'
|
||||||
# me.attributes['content'] = 'text/html;charset=utf-8'
|
me['content'] = 'application/xhtml+xml;charset=utf-8'
|
||||||
me.attributes['content'] = 'application/xhtml+xml;charset=utf-8'
|
head << me
|
||||||
|
|
||||||
METAS.each do |m|
|
METAS.each do |m|
|
||||||
if value = self.attributes[m.to_sym]
|
if value = self.attributes[m.to_sym]
|
||||||
meta = Element.new 'meta', head
|
meta = Nokogiri::XML::Element.new('meta', doc)
|
||||||
meta.attributes['name'] = m
|
meta['name'] = m
|
||||||
meta.attributes['content'] = value.to_s
|
meta['content'] = value.to_s
|
||||||
|
head << meta
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
self.attributes.each do |k,v|
|
self.attributes.each do |k,v|
|
||||||
if k.to_s =~ /\Ameta-(.*)\Z/
|
if k.to_s =~ /\Ameta-(.*)\Z/
|
||||||
meta = Element.new 'meta', head
|
meta = Nokogiri::XML::Element.new('meta',doc)
|
||||||
meta.attributes['name'] = $1
|
meta['name'] = $1
|
||||||
meta.attributes['content'] = v.to_s
|
meta['content'] = v.to_s
|
||||||
|
head << meta
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Create title element
|
# Create title element
|
||||||
doc_title = self.attributes[:title] || self.attributes[:subject] || ""
|
doc_title = self[:title] || self[:subject] || ""
|
||||||
title = Element.new 'title', head
|
title = Nokogiri::XML::Element.new('title', doc)
|
||||||
title << Text.new(doc_title)
|
title << Nokogiri::XML::Text.new(doc_title, doc)
|
||||||
|
head << title
|
||||||
add_css_to(head)
|
add_css_to(head)
|
||||||
|
|
||||||
|
|
||||||
root << xml_newline
|
root << xml_newline
|
||||||
|
|
||||||
body = Element.new 'body'
|
body = Nokogiri::XML::Element.new('body', doc)
|
||||||
|
|
||||||
children_to_html.each do |e|
|
children_to_html.each do |e|
|
||||||
body << e
|
body << e
|
||||||
|
@ -245,7 +223,7 @@ Example:
|
||||||
|
|
||||||
# render footnotes
|
# render footnotes
|
||||||
if @doc.footnotes_order.size > 0
|
if @doc.footnotes_order.size > 0
|
||||||
body << render_footnotes
|
body << render_footnotes(@doc)
|
||||||
end
|
end
|
||||||
|
|
||||||
# When we are rendering a whole document, we add a signature
|
# When we are rendering a whole document, we add a signature
|
||||||
|
@ -255,18 +233,18 @@ Example:
|
||||||
end
|
end
|
||||||
|
|
||||||
root << body
|
root << body
|
||||||
|
|
||||||
doc
|
doc
|
||||||
end
|
end
|
||||||
|
|
||||||
def add_css_to(head)
|
def add_css_to(head)
|
||||||
if css_list = self.attributes[:css]
|
if css_list = self.attributes[:css]
|
||||||
|
d = Nokogiri::XML::Document.new
|
||||||
css_list.split.each do |css|
|
css_list.split.each do |css|
|
||||||
# <link type="text/css" rel="stylesheet" href="..." />
|
# <link type="text/css" rel="stylesheet" href="..." />
|
||||||
link = Element.new 'link'
|
link = Nokogiri::XML::Element.new('link', d)
|
||||||
link.attributes['type'] = 'text/css'
|
link['type'] = 'text/css'
|
||||||
link.attributes['rel'] = 'stylesheet'
|
link['rel'] = 'stylesheet'
|
||||||
link.attributes['href'] = css
|
link['href'] = css
|
||||||
head << link
|
head << link
|
||||||
head << xml_newline
|
head << xml_newline
|
||||||
end
|
end
|
||||||
|
@ -297,49 +275,51 @@ Example:
|
||||||
end
|
end
|
||||||
|
|
||||||
def maruku_html_signature
|
def maruku_html_signature
|
||||||
div = Element.new 'div'
|
d = Nokogiri::XML::Document.new
|
||||||
div.attributes['class'] = 'maruku_signature'
|
div = Nokogiri::XML::Element.new( 'div', d)
|
||||||
Element.new 'hr', div
|
div['class'] = 'maruku_signature'
|
||||||
span = Element.new 'span', div
|
div << Nokogiri::XML::Element.new('hr', div)
|
||||||
span.attributes['style'] = 'font-size: small; font-style: italic'
|
span = Nokogiri::XML::Element.new('span', div)
|
||||||
span << Text.new('Created by ')
|
span['style'] = 'font-size: small; font-style: italic'
|
||||||
a = Element.new('a', span)
|
div << span << Nokogiri::XML::Text.new('Created by ', div)
|
||||||
a.attributes['href'] = 'http://maruku.rubyforge.org'
|
a = Nokogiri::XML::Element.new('a', span)
|
||||||
a.attributes['title'] = 'Maruku: a Markdown-superset interpreter for Ruby'
|
a['href'] = 'http://maruku.rubyforge.org'
|
||||||
a << Text.new('Maruku')
|
a['title'] = 'Maruku: a Markdown-superset interpreter for Ruby'
|
||||||
span << Text.new(nice_date+".")
|
a << Nokogiri::XML::Text.new('Maruku', div)
|
||||||
|
span << Nokogiri::XML::Text.new(nice_date+".", div)
|
||||||
div
|
div
|
||||||
end
|
end
|
||||||
|
|
||||||
def render_footnotes()
|
def render_footnotes
|
||||||
div = Element.new 'div'
|
d = Nokogiri::XML::Document.new
|
||||||
div.attributes['class'] = 'footnotes'
|
div = Nokogiri::XML::Element.new('div', d)
|
||||||
div << Element.new('hr')
|
div['class'] = 'footnotes'
|
||||||
ol = Element.new 'ol'
|
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
|
@doc.footnotes_order.each_with_index do |fid, i| num = i+1
|
||||||
f = self.footnotes[fid]
|
f = self.footnotes[fid]
|
||||||
if f
|
if f
|
||||||
li = f.wrap_as_element('li')
|
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 = Nokogiri::XML::Element.new('a', d)
|
||||||
a.attributes['href'] = "\##{get_setting(:doc_prefix)}fnref:#{num}"
|
a['href'] = "\##{get_setting(:doc_prefix)}fnref:#{num}"
|
||||||
a.attributes['rev'] = 'footnote'
|
a['rev'] = 'footnote'
|
||||||
a<< Text.new('↩', true, nil, true)
|
a << Nokogiri::XML::EntityReference.new(d, '#8617')
|
||||||
|
|
||||||
last = nil
|
last = nil
|
||||||
li.children.reverse_each do |child|
|
li.children.reverse_each do |child|
|
||||||
if child.node_type != :text
|
unless child.text?
|
||||||
last = child
|
last = child
|
||||||
break
|
break
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if last and last.name == "p"
|
if last and last.name == "p"
|
||||||
last.add_text(' ');
|
last << Nokogiri::XML::Text.new(' ', last);
|
||||||
last.add(a);
|
last << a;
|
||||||
else
|
else
|
||||||
li.insert_after(li.children.last, a)
|
li.children.last.add_next_sibling(a)
|
||||||
end
|
end
|
||||||
ol << li
|
ol << li
|
||||||
else
|
else
|
||||||
|
@ -352,8 +332,8 @@ Example:
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
def to_html_hrule; create_html_element 'hr' end
|
def to_html_hrule; create_html_element 'hr'; end
|
||||||
def to_html_linebreak; Element.new 'br' end
|
def to_html_linebreak; create_html_element 'br'; end
|
||||||
|
|
||||||
# renders children as html and wraps into an element of given name
|
# 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)
|
m = create_html_element(name, attributes_to_copy)
|
||||||
children_to_html.each do |e| m << e; end
|
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
|
m
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -437,11 +415,12 @@ It is copied as a standard HTML attribute.
|
||||||
|
|
||||||
|
|
||||||
def create_html_element(name, attributes_to_copy=[])
|
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
|
if atts = HTML4Attributes[name] then
|
||||||
atts.each do |att|
|
atts.each do |att|
|
||||||
if v = @attributes[att] then
|
if v = @attributes[att] then
|
||||||
m.attributes[att.to_s] = v.to_s
|
m[att.to_s] = v.to_s
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
|
@ -495,11 +474,12 @@ by Maruku, to have the same results in both HTML and LaTeX.
|
||||||
|
|
||||||
# nil if not applicable, else SPAN element
|
# nil if not applicable, else SPAN element
|
||||||
def render_section_number
|
def render_section_number
|
||||||
|
d = Nokogiri::XML::Document.new
|
||||||
# if we are bound to a section, add section number
|
# if we are bound to a section, add section number
|
||||||
if num = section_number
|
if num = section_number
|
||||||
span = Element.new 'span'
|
span = Nokogiri::XML::Element.new('span', d)
|
||||||
span.attributes['class'] = 'maruku_section_number'
|
span['class'] = 'maruku_section_number'
|
||||||
span << Text.new(section_number)
|
span << Nokogiri::XML::Text.new(section_number, d)
|
||||||
span
|
span
|
||||||
else
|
else
|
||||||
nil
|
nil
|
||||||
|
@ -517,10 +497,8 @@ by Maruku, to have the same results in both HTML and LaTeX.
|
||||||
end
|
end
|
||||||
|
|
||||||
def source2html(source)
|
def source2html(source)
|
||||||
# source = source.gsub(/&/,'&')
|
d = Nokogiri::XML::Document.new
|
||||||
source = Text.normalize(source)
|
t = Nokogiri::XML::Text.new(source,d)
|
||||||
source.gsub!(/\'|'/,''') # IE bug
|
|
||||||
Text.new(source, true, nil, true )
|
|
||||||
end
|
end
|
||||||
|
|
||||||
=begin maruku_doc
|
=begin maruku_doc
|
||||||
|
@ -582,15 +560,17 @@ and
|
||||||
source = source.gsub(/\n*\Z/,'')
|
source = source.gsub(/\n*\Z/,'')
|
||||||
|
|
||||||
html = convertor.convert( source )
|
html = convertor.convert( source )
|
||||||
|
|
||||||
html.gsub!(/\'|'/,''') # IE bug
|
html.gsub!(/\'|'/,''') # IE bug
|
||||||
# html = html.gsub(/&/,'&')
|
# html = html.gsub(/&/,'&')
|
||||||
|
dd = Nokogiri::XML::Document.new
|
||||||
code = Document.new(html, {:respect_whitespace =>:all}).root
|
d = Nokogiri::XML::Document.parse(html)
|
||||||
|
code = d.root
|
||||||
code.name = 'code'
|
code.name = 'code'
|
||||||
code.attributes['lang'] = lang
|
code['lang'] = lang
|
||||||
|
|
||||||
pre = Element.new 'pre'
|
pre = Nokogiri::XML::Element.new('pre', dd)
|
||||||
pre.attributes['class'] = lang
|
pre['class'] = lang
|
||||||
pre << code
|
pre << code
|
||||||
pre
|
pre
|
||||||
rescue LoadError => e
|
rescue LoadError => e
|
||||||
|
@ -612,7 +592,7 @@ and
|
||||||
|
|
||||||
color = get_setting(:code_background_color)
|
color = get_setting(:code_background_color)
|
||||||
if color != Globals[:code_background_color]
|
if color != Globals[:code_background_color]
|
||||||
element.attributes['style'] = "background-color: #{color};"
|
element['style'] = "background-color: #{color};"
|
||||||
end
|
end
|
||||||
add_ws element
|
add_ws element
|
||||||
end
|
end
|
||||||
|
@ -638,13 +618,11 @@ of the form `#ff00ff`.
|
||||||
|
|
||||||
|
|
||||||
def to_html_code_using_pre(source)
|
def to_html_code_using_pre(source)
|
||||||
|
d = Nokogiri::XML::Document.new
|
||||||
pre = create_html_element 'pre'
|
pre = create_html_element 'pre'
|
||||||
code = Element.new 'code', pre
|
code = Nokogiri::XML::Element.new('code', d)
|
||||||
s = source
|
s = source
|
||||||
|
|
||||||
# s = s.gsub(/&/,'&')
|
|
||||||
s = Text.normalize(s).gsub(/\'|'/,''') # IE bug
|
|
||||||
|
|
||||||
if get_setting(:code_show_spaces)
|
if get_setting(:code_show_spaces)
|
||||||
# 187 = raquo
|
# 187 = raquo
|
||||||
# 160 = nbsp
|
# 160 = nbsp
|
||||||
|
@ -653,13 +631,13 @@ of the form `#ff00ff`.
|
||||||
s.gsub!(/ /,'¬')
|
s.gsub!(/ /,'¬')
|
||||||
end
|
end
|
||||||
|
|
||||||
text = Text.new(s, respect_ws=true, parent=nil, raw=true )
|
text = Nokogiri::XML::Text.new(s, d)
|
||||||
|
|
||||||
if lang = self.attributes[:lang]
|
if lang = self.attributes[:lang]
|
||||||
code.attributes['lang'] = lang
|
code['lang'] = lang
|
||||||
code.attributes['class'] = lang
|
code['class'] = lang
|
||||||
end
|
end
|
||||||
code << text
|
pre << code << text
|
||||||
pre
|
pre
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -670,15 +648,15 @@ of the form `#ff00ff`.
|
||||||
|
|
||||||
color = get_setting(:code_background_color)
|
color = get_setting(:code_background_color)
|
||||||
if color != Globals[: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
|
end
|
||||||
|
|
||||||
pre
|
pre
|
||||||
end
|
end
|
||||||
|
|
||||||
def add_class_to(el, cl)
|
def add_class_to(el, cl)
|
||||||
el.attributes['class'] =
|
el['class'] =
|
||||||
if already = el.attributes['class']
|
if already = el['class']
|
||||||
already + " " + cl
|
already + " " + cl
|
||||||
else
|
else
|
||||||
cl
|
cl
|
||||||
|
@ -704,11 +682,12 @@ of the form `#ff00ff`.
|
||||||
|
|
||||||
|
|
||||||
def to_html_immediate_link
|
def to_html_immediate_link
|
||||||
|
d = Nokogiri::XML::Document.new
|
||||||
a = create_html_element 'a'
|
a = create_html_element 'a'
|
||||||
url = self.url
|
url = self.url
|
||||||
text = url.gsub(/^mailto:/,'') # don't show mailto
|
text = url.gsub(/^mailto:/,'') # don't show mailto
|
||||||
a << Text.new(text)
|
a << Nokogiri::XML::Text.new(text, d)
|
||||||
a.attributes['href'] = url
|
a['href'] = url
|
||||||
add_class_to_link(a)
|
add_class_to_link(a)
|
||||||
a
|
a
|
||||||
end
|
end
|
||||||
|
@ -720,8 +699,8 @@ of the form `#ff00ff`.
|
||||||
if ref = @doc.refs[id]
|
if ref = @doc.refs[id]
|
||||||
url = ref[:url]
|
url = ref[:url]
|
||||||
title = ref[:title]
|
title = ref[:title]
|
||||||
a.attributes['href'] = url if url
|
a['href'] = url if url
|
||||||
a.attributes['title'] = title if title
|
a['title'] = title if title
|
||||||
else
|
else
|
||||||
maruku_error "Could not find ref_id = #{id.inspect} for #{self.inspect}\n"+
|
maruku_error "Could not find ref_id = #{id.inspect} for #{self.inspect}\n"+
|
||||||
"Available refs are #{@doc.refs.keys.inspect}"
|
"Available refs are #{@doc.refs.keys.inspect}"
|
||||||
|
@ -737,8 +716,8 @@ of the form `#ff00ff`.
|
||||||
if url = self.url
|
if url = self.url
|
||||||
title = self.title
|
title = self.title
|
||||||
a = wrap_as_element 'a'
|
a = wrap_as_element 'a'
|
||||||
a.attributes['href'] = url
|
a['href'] = url
|
||||||
a.attributes['title'] = title if title
|
a['title'] = title if title
|
||||||
return a
|
return a
|
||||||
else
|
else
|
||||||
maruku_error"Could not find url in #{self.inspect}"
|
maruku_error"Could not find url in #{self.inspect}"
|
||||||
|
@ -748,7 +727,8 @@ of the form `#ff00ff`.
|
||||||
end
|
end
|
||||||
|
|
||||||
def add_ws(e)
|
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
|
end
|
||||||
##### Email address
|
##### Email address
|
||||||
|
|
||||||
|
@ -761,6 +741,7 @@ of the form `#ff00ff`.
|
||||||
end
|
end
|
||||||
|
|
||||||
def to_html_email_address
|
def to_html_email_address
|
||||||
|
d = Nokogiri::XML::Document.new
|
||||||
email = self.email
|
email = self.email
|
||||||
a = create_html_element 'a'
|
a = create_html_element 'a'
|
||||||
#a.attributes['href'] = Text.new("mailto:"+obfuscate(email),false,nil,true)
|
#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
|
# Sorry, for the moment it doesn't work
|
||||||
a.attributes['href'] = "mailto:#{email}"
|
a.attributes['href'] = "mailto:#{email}"
|
||||||
|
|
||||||
a << Text.new(obfuscate(email),false,nil,true)
|
a << Nokogiri::XML::Text.new(obfuscate(email), d)
|
||||||
a
|
a
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -781,8 +762,8 @@ of the form `#ff00ff`.
|
||||||
if ref = @doc.refs[id]
|
if ref = @doc.refs[id]
|
||||||
url = ref[:url]
|
url = ref[:url]
|
||||||
title = ref[:title]
|
title = ref[:title]
|
||||||
a.attributes['src'] = url.to_s
|
a['src'] = url.to_s
|
||||||
a.attributes['alt'] = children_to_s
|
a['alt'] = children_to_s
|
||||||
else
|
else
|
||||||
maruku_error"Could not find id = #{id.inspect} for\n #{self.inspect}"
|
maruku_error"Could not find id = #{id.inspect} for\n #{self.inspect}"
|
||||||
tell_user "Could not create image with ref_id = #{id.inspect};"+
|
tell_user "Could not create image with ref_id = #{id.inspect};"+
|
||||||
|
@ -801,8 +782,8 @@ of the form `#ff00ff`.
|
||||||
end
|
end
|
||||||
title = self.title
|
title = self.title
|
||||||
a = create_html_element 'img'
|
a = create_html_element 'img'
|
||||||
a.attributes['src'] = url.to_s
|
a['src'] = url.to_s
|
||||||
a.attributes['alt'] = children_to_s
|
a['alt'] = children_to_s
|
||||||
return a
|
return a
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -815,6 +796,7 @@ If true, raw HTML is discarded from the output.
|
||||||
=end
|
=end
|
||||||
|
|
||||||
def to_html_raw_html
|
def to_html_raw_html
|
||||||
|
d = Nokogiri::XML::Document.new
|
||||||
return [] if get_setting(:filter_html)
|
return [] if get_setting(:filter_html)
|
||||||
|
|
||||||
raw_html = self.raw_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}"
|
"Raw HTML:\n#{raw_html.inspect}"
|
||||||
maruku_error s
|
maruku_error s
|
||||||
tell_user 'The REXML version you have has a bug, omitting HTML'
|
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)
|
#div << Text.new(s)
|
||||||
return div
|
return div
|
||||||
end
|
end
|
||||||
|
|
||||||
# copies the @children array (FIXME is it deep?)
|
# copies the @children array (FIXME is it deep?)
|
||||||
elements = root.to_a
|
elements = root.children.to_a
|
||||||
return elements
|
|
||||||
else # invalid
|
else # invalid
|
||||||
# Creates red box with offending HTML
|
# Creates red box with offending HTML
|
||||||
tell_user "Wrapping bad html in a PRE with class 'markdown-html-error'\n"+
|
tell_user "Wrapping bad html in a PRE with class 'markdown-html-error'\n"+
|
||||||
raw_html.gsub(/^/, '|')
|
raw_html.gsub(/^/, '|')
|
||||||
pre = Element.new('pre')
|
pre = Nokogiri::XML::Element.new('pre', d)
|
||||||
pre.attributes['style'] = 'border: solid 3px red; background-color: pink'
|
pre['style'] = 'border: solid 3px red; background-color: pink'
|
||||||
pre.attributes['class'] = 'markdown-html-error'
|
pre['class'] = 'markdown-html-error'
|
||||||
pre << Text.new("REXML could not parse this XML/HTML: \n#{raw_html}", true)
|
pre << Nokogiri::XML::Text.new("Nokogiri could not parse this XML/HTML: \n#{raw_html}", d)
|
||||||
return pre
|
return pre
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def to_html_abbr
|
def to_html_abbr
|
||||||
abbr = Element.new 'abbr'
|
d = Nokogiri::XML::Document.new
|
||||||
abbr << Text.new(children[0])
|
abbr = Nokogiri::XML::Element.new('abbr', d)
|
||||||
abbr.attributes['title'] = self.title if self.title
|
abbr << Nokogiri::XML::Text.new(children[0], d)
|
||||||
|
abbr['title'] = self.title if self.title
|
||||||
abbr
|
abbr
|
||||||
end
|
end
|
||||||
|
|
||||||
def to_html_footnote_reference
|
def to_html_footnote_reference
|
||||||
|
d = Nokogiri::XML::Document.new
|
||||||
id = self.footnote_id
|
id = self.footnote_id
|
||||||
|
|
||||||
# save the order of used footnotes
|
# save the order of used footnotes
|
||||||
|
@ -873,12 +856,12 @@ If true, raw HTML is discarded from the output.
|
||||||
#num = order.size;
|
#num = order.size;
|
||||||
num = order.index(id) + 1
|
num = order.index(id) + 1
|
||||||
|
|
||||||
sup = Element.new 'sup'
|
sup = Nokogiri::XML::Element.new('sup', d)
|
||||||
sup.attributes['id'] = "#{get_setting(:doc_prefix)}fnref:#{num}"
|
sup['id'] = "#{get_setting(:doc_prefix)}fnref:#{num}"
|
||||||
a = Element.new 'a'
|
a = Nokogiri::XML::Element.new('a', d)
|
||||||
a << Text.new(num.to_s)
|
a << Nokogiri::XML::Text.new(num.to_s, d)
|
||||||
a.attributes['href'] = "\##{get_setting(:doc_prefix)}fn:#{num}"
|
a['href'] = "\##{get_setting(:doc_prefix)}fn:#{num}"
|
||||||
a.attributes['rel'] = 'footnote'
|
a['rel'] = 'footnote'
|
||||||
sup << a
|
sup << a
|
||||||
|
|
||||||
sup
|
sup
|
||||||
|
@ -904,21 +887,21 @@ If true, raw HTML is discarded from the output.
|
||||||
end
|
end
|
||||||
|
|
||||||
table = create_html_element 'table'
|
table = create_html_element 'table'
|
||||||
thead = Element.new 'thead'
|
thead = Nokogiri::XML::Element.new('thead', table)
|
||||||
tr = Element.new 'tr'
|
tr = Nokogiri::XML::Element.new('tr', table)
|
||||||
array_to_html(head).each do |x| tr<<x end
|
array_to_html(head).each do |x| tr<<x end
|
||||||
thead << tr
|
thead << tr
|
||||||
table << thead
|
table << thead
|
||||||
|
|
||||||
tbody = Element.new 'tbody'
|
tbody = Nokogiri::XML::Element.new('tbody', table)
|
||||||
rows.each do |row|
|
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|
|
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
|
tr<<x
|
||||||
end
|
end
|
||||||
|
|
||||||
tbody << tr << Text.new("\n")
|
tbody << tr << Nokogiri::XML::Text.new("\n", table)
|
||||||
end
|
end
|
||||||
table << tbody
|
table << tbody
|
||||||
table
|
table
|
||||||
|
@ -934,6 +917,7 @@ If true, raw HTML is discarded from the output.
|
||||||
end
|
end
|
||||||
|
|
||||||
def to_html_entity
|
def to_html_entity
|
||||||
|
d = Nokogiri::XML::Document.new
|
||||||
MaRuKu::Out::Latex.need_entity_table
|
MaRuKu::Out::Latex.need_entity_table
|
||||||
|
|
||||||
entity_name = self.entity_name
|
entity_name = self.entity_name
|
||||||
|
@ -949,17 +933,17 @@ If true, raw HTML is discarded from the output.
|
||||||
|
|
||||||
|
|
||||||
if entity_name.kind_of? Fixnum
|
if entity_name.kind_of? Fixnum
|
||||||
# Entity.new(entity_name)
|
Nokogiri::XML::EntityReference.new(d, '#%d' % [entity_name])
|
||||||
Text.new('&#%d;' % [entity_name], false, nil, true)
|
|
||||||
else
|
else
|
||||||
Text.new('&%s;' % [entity_name], false, nil, true)
|
Nokogiri::XML::EntityReference.new(d, '%s' % [entity_name])
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def to_html_xml_instr
|
def to_html_xml_instr
|
||||||
target = self.target || ''
|
target = self.target || ''
|
||||||
code = self.code || ''
|
code = self.code || ''
|
||||||
REXML::Instruction.new(target, code)
|
d = Nokogiri::XML::Document.new
|
||||||
|
Nokogiri::XML::ProcessingInstruction.new(d,target,code)
|
||||||
end
|
end
|
||||||
|
|
||||||
# Convert each child to html
|
# Convert each child to html
|
||||||
|
@ -970,8 +954,7 @@ If true, raw HTML is discarded from the output.
|
||||||
def array_to_html(array)
|
def array_to_html(array)
|
||||||
e = []
|
e = []
|
||||||
array.each do |c|
|
array.each do |c|
|
||||||
method = c.kind_of?(MDElement) ?
|
method = c.kind_of?(MDElement) ? "to_html_#{c.node_type}" : "to_html"
|
||||||
"to_html_#{c.node_type}" : "to_html"
|
|
||||||
|
|
||||||
if not c.respond_to?(method)
|
if not c.respond_to?(method)
|
||||||
#raise "Object does not answer to #{method}: #{c.class} #{c.inspect}"
|
#raise "Object does not answer to #{method}: #{c.class} #{c.inspect}"
|
||||||
|
|
|
@ -19,12 +19,10 @@
|
||||||
#++
|
#++
|
||||||
|
|
||||||
|
|
||||||
require 'rexml/document'
|
require 'nokogiri'
|
||||||
|
|
||||||
module MaRuKu; module Out; module Latex
|
module MaRuKu; module Out; module Latex
|
||||||
|
|
||||||
include REXML
|
|
||||||
|
|
||||||
def to_latex_entity
|
def to_latex_entity
|
||||||
MaRuKu::Out::Latex.need_entity_table
|
MaRuKu::Out::Latex.need_entity_table
|
||||||
|
|
||||||
|
@ -69,13 +67,13 @@ module MaRuKu; module Out; module Latex
|
||||||
def Latex.init_entity_table
|
def Latex.init_entity_table
|
||||||
# $stderr.write "Creating entity table.."
|
# $stderr.write "Creating entity table.."
|
||||||
# $stderr.flush
|
# $stderr.flush
|
||||||
doc = Document.new(File.read(File.dirname(__FILE__) + "/../../../data/entities.xml"))
|
doc = Nokogiri::XML::Document.parse(File.read(File.dirname(__FILE__) + "/../../../data/entities.xml"))
|
||||||
doc.elements.each("//char") do |c|
|
doc.xpath("//char").each do |c|
|
||||||
num = c.attributes['num'].to_i
|
num = c['num'].to_i
|
||||||
name = c.attributes['name']
|
name = c['name']
|
||||||
package = c.attributes['package']
|
package = c['package']
|
||||||
|
|
||||||
convert = c.attributes['convertTo']
|
convert = c['convertTo']
|
||||||
convert.gsub!(/@DOUBLEQUOT/,'"')
|
convert.gsub!(/@DOUBLEQUOT/,'"')
|
||||||
convert.gsub!(/@QUOT/,"'")
|
convert.gsub!(/@QUOT/,"'")
|
||||||
convert.gsub!(/@GT/,">")
|
convert.gsub!(/@GT/,">")
|
||||||
|
|
18
vendor/plugins/maruku/lib/maruku/toc.rb
vendored
18
vendor/plugins/maruku/lib/maruku/toc.rb
vendored
|
@ -16,6 +16,7 @@
|
||||||
# along with Maruku; if not, write to the Free Software
|
# along with Maruku; if not, write to the Free Software
|
||||||
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
|
require 'nokogiri'
|
||||||
|
|
||||||
module MaRuKu
|
module MaRuKu
|
||||||
# A section in the table of contents of a document.
|
# A section in the table of contents of a document.
|
||||||
|
@ -87,14 +88,14 @@ module MaRuKu
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
include REXML
|
|
||||||
|
|
||||||
# Returns an HTML representation of the table of contents.
|
# Returns an HTML representation of the table of contents.
|
||||||
#
|
#
|
||||||
# This should only be called on the root section.
|
# This should only be called on the root section.
|
||||||
def to_html
|
def to_html
|
||||||
div = Element.new 'div'
|
d = Nokogiri::XML::Document.new
|
||||||
div.attributes['class'] = 'maruku_toc'
|
div = Nokogiri::XML::Element.new('div', d)
|
||||||
|
div['class'] = 'maruku_toc'
|
||||||
div << _to_html
|
div << _to_html
|
||||||
div
|
div
|
||||||
end
|
end
|
||||||
|
@ -109,18 +110,19 @@ module MaRuKu
|
||||||
protected
|
protected
|
||||||
|
|
||||||
def _to_html
|
def _to_html
|
||||||
ul = Element.new 'ul'
|
d = Nokogiri::XML::Document.new
|
||||||
|
ul = Nokogiri::XML::Element.new('ul', d)
|
||||||
# let's remove the bullets
|
# let's remove the bullets
|
||||||
ul.attributes['style'] = 'list-style: none;'
|
ul['style'] = 'list-style: none;'
|
||||||
@section_children.each do |c|
|
@section_children.each do |c|
|
||||||
li = Element.new 'li'
|
li = Nokogiri::XML::Element.new('li', d)
|
||||||
if span = c.header_element.render_section_number
|
if span = c.header_element.render_section_number
|
||||||
li << span
|
li << span
|
||||||
end
|
end
|
||||||
|
|
||||||
a = c.header_element.wrap_as_element('a')
|
a = c.header_element.wrap_as_element('a')
|
||||||
a.delete_attribute 'id'
|
a.delete('id')
|
||||||
a.attributes['href'] = "##{c.header_element.attributes[:id]}"
|
a['href'] = "##{c.header_element.attributes[:id]}"
|
||||||
|
|
||||||
li << a
|
li << a
|
||||||
li << c._to_html if c.section_children.size > 0
|
li << c._to_html if c.section_children.size > 0
|
||||||
|
|
3
vendor/plugins/maruku/miscs/bug.rb
vendored
Normal file
3
vendor/plugins/maruku/miscs/bug.rb
vendored
Normal 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
29
vendor/plugins/maruku/miscs/test.rb
vendored
Normal 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"
|
|
@ -32,7 +32,7 @@ md_el(:document,[
|
||||||
md_el(:abbr_def,[],{:abbr=>"Tigra Genesis",:text=>nil},[])
|
md_el(:abbr_def,[],{:abbr=>"Tigra Genesis",:text=>nil},[])
|
||||||
],{},[])
|
],{},[])
|
||||||
*** Output of to_html ***
|
*** 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>
|
<p>Operation <abbr>Tigra Genesis</abbr> is going well.</p>
|
||||||
*** Output of to_latex ***
|
*** Output of to_latex ***
|
||||||
|
@ -50,15 +50,3 @@ Operation Tigra Genesisis going well.
|
||||||
*[Tigra Genesis]:
|
*[Tigra Genesis]:
|
||||||
*** Output of to_s ***
|
*** Output of to_s ***
|
||||||
The HTML specification is maintained by the W3C.Operation Tigra Genesis is going well.
|
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)
|
|
|
@ -8,22 +8,10 @@ Write a comment here
|
||||||
*** Output of inspect ***
|
*** Output of inspect ***
|
||||||
md_el(:document,[md_par([md_im_image(["bar"], "/foo.jpg", nil)])],{},[])
|
md_el(:document,[md_par([md_im_image(["bar"], "/foo.jpg", nil)])],{},[])
|
||||||
*** Output of to_html ***
|
*** 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_latex ***
|
||||||
|
|
||||||
*** Output of to_md ***
|
*** Output of to_md ***
|
||||||
bar
|
bar
|
||||||
*** Output of to_s ***
|
*** Output of to_s ***
|
||||||
bar
|
bar
|
||||||
*** EOF ***
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
OK!
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
*** Output of Markdown.pl ***
|
|
||||||
(not used anymore)
|
|
||||||
*** Output of Markdown.pl (parsed) ***
|
|
||||||
(not used anymore)
|
|
|
@ -18,15 +18,3 @@ md_el(:document,[
|
||||||
|
|
||||||
*** Output of to_s ***
|
*** Output of to_s ***
|
||||||
|
|
||||||
*** EOF ***
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
OK!
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
*** Output of Markdown.pl ***
|
|
||||||
(not used anymore)
|
|
||||||
*** Output of Markdown.pl (parsed) ***
|
|
||||||
(not used anymore)
|
|
|
@ -13,9 +13,9 @@ md_el(:document,[
|
||||||
md_par(["Paragraph2"], [[:id, "par2"]])
|
md_par(["Paragraph2"], [[:id, "par2"]])
|
||||||
],{},[])
|
],{},[])
|
||||||
*** Output of to_html ***
|
*** 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 ***
|
*** Output of to_latex ***
|
||||||
Paragraph1
|
Paragraph1
|
||||||
|
|
||||||
|
@ -26,15 +26,3 @@ Paragraph1
|
||||||
Paragraph2
|
Paragraph2
|
||||||
*** Output of to_s ***
|
*** Output of to_s ***
|
||||||
Paragraph1Paragraph2
|
Paragraph1Paragraph2
|
||||||
*** EOF ***
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
OK!
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
*** Output of Markdown.pl ***
|
|
||||||
(not used anymore)
|
|
||||||
*** Output of Markdown.pl (parsed) ***
|
|
||||||
(not used anymore)
|
|
|
@ -30,21 +30,21 @@ md_el(:document,[
|
||||||
md_el(:ald,[],{:ald=>[[:class, "chello"]],:ald_id=>"hello"},[])
|
md_el(:ald,[],{:ald=>[[:class, "chello"]],:ald_id=>"hello"},[])
|
||||||
],{},[])
|
],{},[])
|
||||||
*** Output of to_html ***
|
*** 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 ***
|
*** Output of to_latex ***
|
||||||
\hypertarget{header1}{}\subsection*{{Header with attributes}}\label{header1}
|
\hypertarget{header1}{}\subsection*{{Header with attributes}}\label{header1}
|
||||||
|
|
||||||
\hypertarget{header2}{}\subsubsection*{{Header with attributes}}\label{header2}
|
\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.
|
Paragraph with a.
|
||||||
|
|
||||||
|
@ -55,15 +55,3 @@ Header with attributesHeader with attributesHeader no attributesParagraph with a
|
||||||
Paragraph with emphasis
|
Paragraph with emphasis
|
||||||
*** Output of to_s ***
|
*** Output of to_s ***
|
||||||
Header with attributesHeader with attributesHeader no attributesParagraph with a.Paragraph with emphasis
|
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)
|
|
|
@ -24,15 +24,3 @@ Paragraph
|
||||||
Paragraph
|
Paragraph
|
||||||
*** Output of to_s ***
|
*** Output of to_s ***
|
||||||
Paragraph
|
Paragraph
|
||||||
*** EOF ***
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
OK!
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
*** Output of Markdown.pl ***
|
|
||||||
(not used anymore)
|
|
||||||
*** Output of Markdown.pl (parsed) ***
|
|
||||||
(not used anymore)
|
|
|
@ -13,22 +13,10 @@ md_el(:document,[
|
||||||
md_el(:ald,[],{:ald=>[[:class, "maruku-par"]],:ald_id=>"paragraph"},[])
|
md_el(:ald,[],{:ald=>[[:class, "maruku-par"]],:ald_id=>"paragraph"},[])
|
||||||
],{},[])
|
],{},[])
|
||||||
*** Output of to_html ***
|
*** Output of to_html ***
|
||||||
<p class='maruku-par' id='2'>Paragraph2</p>
|
<p id="2" class="maruku-par">Paragraph2</p>
|
||||||
*** Output of to_latex ***
|
*** Output of to_latex ***
|
||||||
Paragraph2
|
Paragraph2
|
||||||
*** Output of to_md ***
|
*** Output of to_md ***
|
||||||
Paragraph2
|
Paragraph2
|
||||||
*** Output of to_s ***
|
*** Output of to_s ***
|
||||||
Paragraph2
|
Paragraph2
|
||||||
*** EOF ***
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
OK!
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
*** Output of Markdown.pl ***
|
|
||||||
(not used anymore)
|
|
||||||
*** Output of Markdown.pl (parsed) ***
|
|
||||||
(not used anymore)
|
|
|
@ -22,15 +22,3 @@ Linea 1
|
||||||
Linea 2
|
Linea 2
|
||||||
*** Output of to_s ***
|
*** Output of to_s ***
|
||||||
Linea 1Linea 2
|
Linea 1Linea 2
|
||||||
*** EOF ***
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
OK!
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
*** Output of Markdown.pl ***
|
|
||||||
(not used anymore)
|
|
||||||
*** Output of Markdown.pl (parsed) ***
|
|
||||||
(not used anymore)
|
|
|
@ -73,15 +73,3 @@ This block is composed of 5
|
||||||
This block is composed of 2
|
This block is composed of 2
|
||||||
*** Output of to_s ***
|
*** Output of to_s ***
|
||||||
This block is composed of three lines:This block is composed of 5This block is composed of 2
|
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)
|
|
|
@ -14,15 +14,3 @@ test:
|
||||||
test:
|
test:
|
||||||
*** Output of to_s ***
|
*** Output of to_s ***
|
||||||
test:
|
test:
|
||||||
*** EOF ***
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
OK!
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
*** Output of Markdown.pl ***
|
|
||||||
(not used anymore)
|
|
||||||
*** Output of Markdown.pl (parsed) ***
|
|
||||||
(not used anymore)
|
|
|
@ -27,8 +27,8 @@ md_el(:document,[
|
||||||
md_el(:ald,[],{:ald=>[["scope", "row"]],:ald_id=>"t"},[])
|
md_el(:ald,[],{:ald=>[["scope", "row"]],:ald_id=>"t"},[])
|
||||||
],{},[])
|
],{},[])
|
||||||
*** Output of to_html ***
|
*** Output of to_html ***
|
||||||
<p class='class1' style='color:red'>hello</p>
|
<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>
|
<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>
|
</tr></tbody></table>
|
||||||
*** Output of to_latex ***
|
*** Output of to_latex ***
|
||||||
hello
|
hello
|
||||||
|
@ -44,15 +44,3 @@ hello
|
||||||
hh c1c2
|
hh c1c2
|
||||||
*** Output of to_s ***
|
*** Output of to_s ***
|
||||||
hellohh c1c2
|
hellohh c1c2
|
||||||
*** EOF ***
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
OK!
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
*** Output of Markdown.pl ***
|
|
||||||
(not used anymore)
|
|
||||||
*** Output of Markdown.pl (parsed) ***
|
|
||||||
(not used anymore)
|
|
|
@ -17,7 +17,7 @@ md_el(:document,[
|
||||||
*** Output of to_html ***
|
*** Output of to_html ***
|
||||||
<p>Here is an example of AppleScript:</p>
|
<p>Here is an example of AppleScript:</p>
|
||||||
|
|
||||||
<pre><code>tell application "Foo"
|
<pre><code>tell application "Foo"
|
||||||
beep
|
beep
|
||||||
end tell
|
end tell
|
||||||
tab</code></pre>
|
tab</code></pre>
|
||||||
|
@ -32,15 +32,3 @@ end tell
|
||||||
Here is an example of AppleScript:
|
Here is an example of AppleScript:
|
||||||
*** Output of to_s ***
|
*** Output of to_s ***
|
||||||
Here is an example of AppleScript:
|
Here is an example of AppleScript:
|
||||||
*** EOF ***
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
OK!
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
*** Output of Markdown.pl ***
|
|
||||||
(not used anymore)
|
|
||||||
*** Output of Markdown.pl (parsed) ***
|
|
||||||
(not used anymore)
|
|
|
@ -26,15 +26,3 @@ Code
|
||||||
Code
|
Code
|
||||||
*** Output of to_s ***
|
*** Output of to_s ***
|
||||||
Code
|
Code
|
||||||
*** EOF ***
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
OK!
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
*** Output of Markdown.pl ***
|
|
||||||
(not used anymore)
|
|
||||||
*** Output of Markdown.pl (parsed) ***
|
|
||||||
(not used anymore)
|
|
|
@ -69,15 +69,3 @@ This is code (1 tab):
|
||||||
This is not code
|
This is not code
|
||||||
*** Output of to_s ***
|
*** Output of to_s ***
|
||||||
This is code (4 spaces):This is not codeThis is code (1 tab):This is not code
|
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)
|
|
|
@ -23,15 +23,3 @@ md_el(:document,[
|
||||||
1. abcd efgh ijkl
|
1. abcd efgh ijkl
|
||||||
*** Output of to_s ***
|
*** Output of to_s ***
|
||||||
abcd efgh ijkl
|
abcd efgh ijkl
|
||||||
*** EOF ***
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
OK!
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
*** Output of Markdown.pl ***
|
|
||||||
(not used anymore)
|
|
||||||
*** Output of Markdown.pl (parsed) ***
|
|
||||||
(not used anymore)
|
|
|
@ -165,15 +165,3 @@ text
|
||||||
text
|
text
|
||||||
*** Output of to_s ***
|
*** Output of to_s ***
|
||||||
texttexttexttexttexttexttexttexttexttexttexttext
|
texttexttexttexttexttexttexttexttexttexttexttext
|
||||||
*** EOF ***
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
OK!
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
*** Output of Markdown.pl ***
|
|
||||||
(not used anymore)
|
|
||||||
*** Output of Markdown.pl (parsed) ***
|
|
||||||
(not used anymore)
|
|
|
@ -19,15 +19,3 @@ ciao
|
||||||
ciao
|
ciao
|
||||||
*** Output of to_s ***
|
*** Output of to_s ***
|
||||||
ciao
|
ciao
|
||||||
*** EOF ***
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
OK!
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
*** Output of Markdown.pl ***
|
|
||||||
(not used anymore)
|
|
||||||
*** Output of Markdown.pl (parsed) ***
|
|
||||||
(not used anymore)
|
|
|
@ -20,12 +20,12 @@ md_el(:document,[
|
||||||
],{:label=>nil,:num=>nil,:type=>nil},[[:class, "warning"]])
|
],{:label=>nil,:num=>nil,:type=>nil},[[:class, "warning"]])
|
||||||
],{},[])
|
],{},[])
|
||||||
*** Output of to_html ***
|
*** Output of to_html ***
|
||||||
<div class='warning'>
|
<div class="warning">
|
||||||
<p>this is the last warning!</p>
|
<p>this is the last warning!</p>
|
||||||
|
|
||||||
<p>please, go away!</p>
|
<p>please, go away!</p>
|
||||||
|
|
||||||
<div class='menace'>
|
<div class="menace">
|
||||||
<p>or else terrible things will happen</p>
|
<p>or else terrible things will happen</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -43,15 +43,3 @@ please, go away!
|
||||||
or else terrible things will happen
|
or else terrible things will happen
|
||||||
*** Output of to_s ***
|
*** Output of to_s ***
|
||||||
this is the last warning!please, go away!or else terrible things will happen
|
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)
|
|
|
@ -13,15 +13,3 @@ md_el(:document,[md_par([md_em(["Hello!"]), " how are ", md_strong(["you"]), "?"
|
||||||
Hello!how are you?
|
Hello!how are you?
|
||||||
*** Output of to_s ***
|
*** Output of to_s ***
|
||||||
Hello! how are you?
|
Hello! how are you?
|
||||||
*** EOF ***
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
OK!
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
*** Output of Markdown.pl ***
|
|
||||||
(not used anymore)
|
|
||||||
*** Output of Markdown.pl (parsed) ***
|
|
||||||
(not used anymore)
|
|
|
@ -18,15 +18,3 @@ This is an email address: \href{mailto:andrea@invalid.it}{andrea\char64invalid\c
|
||||||
This is an email address:
|
This is an email address:
|
||||||
*** Output of to_s ***
|
*** Output of to_s ***
|
||||||
This is an email address:
|
This is an email address:
|
||||||
*** EOF ***
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
OK!
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
*** Output of Markdown.pl ***
|
|
||||||
(not used anymore)
|
|
||||||
*** Output of Markdown.pl (parsed) ***
|
|
||||||
(not used anymore)
|
|
|
@ -13,23 +13,10 @@ md_el(:document,[
|
||||||
])
|
])
|
||||||
],{},[])
|
],{},[])
|
||||||
*** Output of to_html ***
|
*** Output of to_html ***
|
||||||
<p>This is iso-8859-1: à èìà ù.</p>
|
<p>This is iso-8859-1: àèìàù.</p>
|
||||||
*** Output of to_latex ***
|
*** Output of to_latex ***
|
||||||
This is iso-8859-1: à èìà ù.
|
This is iso-8859-1: à èìà ù.
|
||||||
*** Output of to_md ***
|
*** Output of to_md ***
|
||||||
This is iso-8859-1:
|
This is iso-8859-1: à èìà ù.
|
||||||
à èìà ù.
|
|
||||||
*** Output of to_s ***
|
*** Output of to_s ***
|
||||||
This is iso-8859-1: à èìà ù.
|
This is iso-8859-1: à èìà ù.
|
||||||
*** EOF ***
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
OK!
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
*** Output of Markdown.pl ***
|
|
||||||
(not used anymore)
|
|
||||||
*** Output of Markdown.pl (parsed) ***
|
|
||||||
(not used anymore)
|
|
|
@ -9,22 +9,10 @@ Japanese: マルク
|
||||||
*** Output of inspect ***
|
*** Output of inspect ***
|
||||||
md_el(:document,[md_par(["Japanese: \343\203\236\343\203\253\343\202\257"])],{},[])
|
md_el(:document,[md_par(["Japanese: \343\203\236\343\203\253\343\202\257"])],{},[])
|
||||||
*** Output of to_html ***
|
*** Output of to_html ***
|
||||||
<p>Japanese: マルク</p>
|
<p>Japanese: マルク</p>
|
||||||
*** Output of to_latex ***
|
*** Output of to_latex ***
|
||||||
Japanese: マルク
|
Japanese: マルク
|
||||||
*** Output of to_md ***
|
*** Output of to_md ***
|
||||||
Japanese: マルク
|
Japanese: マルク
|
||||||
*** Output of to_s ***
|
*** Output of to_s ***
|
||||||
Japanese: マルク
|
Japanese: マルク
|
||||||
*** EOF ***
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
OK!
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
*** Output of Markdown.pl ***
|
|
||||||
(not used anymore)
|
|
||||||
*** Output of Markdown.pl (parsed) ***
|
|
||||||
(not used anymore)
|
|
|
@ -48,11 +48,11 @@ md_el(:document,[
|
||||||
],{},[])
|
],{},[])
|
||||||
*** Output of to_html ***
|
*** Output of to_html ***
|
||||||
<p>Maruku translates HTML entities to the equivalent in LaTeX:</p>
|
<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>&copy;</code></td><td style='text-align: left;'>©</td>
|
<table><thead><tr><th>Entity</th><th>Result</th></tr></thead><tbody><tr><td style="text-align: left;"><code>&copy;</code></td><td style="text-align: left;">©</td>
|
||||||
</tr><tr><td style='text-align: left;'><code>&pound;</code></td><td style='text-align: left;'>£</td>
|
</tr><tr><td style="text-align: left;"><code>&pound;</code></td><td style="text-align: left;">£</td>
|
||||||
</tr><tr><td style='text-align: left;'><code>a&nbsp;b</code></td><td style='text-align: left;'>a b</td>
|
</tr><tr><td style="text-align: left;"><code>a&nbsp;b</code></td><td style="text-align: left;">a b</td>
|
||||||
</tr><tr><td style='text-align: left;'><code>&lambda;</code></td><td style='text-align: left;'>λ</td>
|
</tr><tr><td style="text-align: left;"><code>&lambda;</code></td><td style="text-align: left;">λ</td>
|
||||||
</tr><tr><td style='text-align: left;'><code>&mdash;</code></td><td style='text-align: left;'>—</td>
|
</tr><tr><td style="text-align: left;"><code>&mdash;</code></td><td style="text-align: left;">—</td>
|
||||||
</tr></tbody></table>
|
</tr></tbody></table>
|
||||||
<p>Entity-substitution does not happen in code blocks or inline code.</p>
|
<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: .
|
It should read just like this: .
|
||||||
*** Output of to_s ***
|
*** 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: .
|
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)
|
|
|
@ -65,15 +65,3 @@ of paragraph
|
||||||
End of
|
End of
|
||||||
*** Output of to_s ***
|
*** Output of to_s ***
|
||||||
Hello: ! ! ` { } [ ] ( ) # . ! * * *Ora, emphasis, bold, * <- due asterischi-> * , un underscore-> _ , emphasis, incrediblee!This is (after) of paragraphEnd of
|
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)
|
|
|
@ -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.
|
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 ***
|
*** 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.
|
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)
|
|
|
@ -33,15 +33,15 @@ md_el(:document,[
|
||||||
])
|
])
|
||||||
],{},[])
|
],{},[])
|
||||||
*** Output of to_html ***
|
*** 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>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 ***
|
*** Output of to_latex ***
|
||||||
\hypertarget{header1}{}\section*{{Header 1}}\label{header1}
|
\hypertarget{header1}{}\section*{{Header 1}}\label{header1}
|
||||||
|
|
||||||
|
@ -61,15 +61,3 @@ Link back to header 2,
|
||||||
Link back to header 3
|
Link back to header 3
|
||||||
*** Output of to_s ***
|
*** 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
|
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)
|
|
|
@ -21,8 +21,8 @@ md_el(:document,[
|
||||||
],{:align=>[:left, :left]},[])
|
],{:align=>[:left, :left]},[])
|
||||||
],{},[])
|
],{},[])
|
||||||
*** Output of to_html ***
|
*** 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>
|
<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><tr><td style="text-align: left;">Content Cell</td><td style="text-align: left;">Content Cell</td>
|
||||||
</tr></tbody></table>
|
</tr></tbody></table>
|
||||||
*** Output of to_latex ***
|
*** Output of to_latex ***
|
||||||
\begin{tabular}{l|l}
|
\begin{tabular}{l|l}
|
||||||
|
@ -35,15 +35,3 @@ Content Cell&Content Cell\\
|
||||||
First HeaderSecond HeaderContent CellContent CellContent CellContent Cell
|
First HeaderSecond HeaderContent CellContent CellContent CellContent Cell
|
||||||
*** Output of to_s ***
|
*** Output of to_s ***
|
||||||
First HeaderSecond HeaderContent CellContent CellContent CellContent Cell
|
First HeaderSecond HeaderContent CellContent CellContent CellContent Cell
|
||||||
*** EOF ***
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
OK!
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
*** Output of Markdown.pl ***
|
|
||||||
(not used anymore)
|
|
||||||
*** Output of Markdown.pl (parsed) ***
|
|
||||||
(not used anymore)
|
|
|
@ -54,20 +54,20 @@ md_el(:document,[
|
||||||
md_par(["This is not a footnote."])
|
md_par(["This is not a footnote."])
|
||||||
],{},[])
|
],{},[])
|
||||||
*** Output of to_html ***
|
*** Output of to_html ***
|
||||||
<p>That’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’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>
|
<p>This is not a footnote.</p>
|
||||||
<div class='footnotes'><hr /><ol><li id='fn:1'>
|
<div class="footnotes"><hr/><ol><li id="fn:1">
|
||||||
<p>And that’s the footnote. This is second sentence (same paragraph).</p>
|
<p>And that’s the footnote. This is second sentence (same paragraph). <a href="#fnref:1" rev="footnote">↩</a></p>
|
||||||
<a href='#fnref:1' rev='footnote'>↩</a></li><li id='fn:2'>
|
</li><li id="fn:2">
|
||||||
<p>This is the very long one.</p>
|
<p>This is the very long one.</p>
|
||||||
|
|
||||||
<p>That’s the second paragraph.</p>
|
<p>That’s the second paragraph. <a href="#fnref:2" rev="footnote">↩</a></p>
|
||||||
<a href='#fnref:2' rev='footnote'>↩</a></li><li id='fn:3'>
|
</li><li id="fn:3">
|
||||||
<p>And that’s the footnote.</p>
|
<p>And that’s the footnote.</p>
|
||||||
|
|
||||||
<p>That’s the second paragraph of the footnote.</p>
|
<p>That’s the second paragraph of the footnote. <a href="#fnref:3" rev="footnote">↩</a></p>
|
||||||
<a href='#fnref:3' rev='footnote'>↩</a></li></ol></div>
|
</li></ol></div>
|
||||||
*** Output of to_latex ***
|
*** 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.
|
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.
|
This is not a footnote.
|
||||||
*** Output of to_s ***
|
*** 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.
|
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)
|
|
|
@ -20,30 +20,18 @@ md_el(:document,[
|
||||||
md_el(:header,["A title with ", md_em(["emphasis"])],{:level=>4},[])
|
md_el(:header,["A title with ", md_em(["emphasis"])],{:level=>4},[])
|
||||||
],{},[])
|
],{},[])
|
||||||
*** Output of to_html ***
|
*** 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 ***
|
*** 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 ***
|
*** Output of to_md ***
|
||||||
A title with emphasisA title with emphasisA title with emphasis
|
A title with emphasisA title with emphasisA title with emphasis
|
||||||
*** Output of to_s ***
|
*** Output of to_s ***
|
||||||
A title with emphasisA title with emphasisA title with emphasis
|
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)
|
|
|
@ -35,15 +35,3 @@ alpha, and or for the Arabic letter
|
||||||
alef.
|
alef.
|
||||||
*** Output of to_s ***
|
*** 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.
|
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)
|
|
|
@ -37,15 +37,3 @@ md_el(:document,[
|
||||||
|
|
||||||
*** Output of to_s ***
|
*** Output of to_s ***
|
||||||
|
|
||||||
*** EOF ***
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
OK!
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
*** Output of Markdown.pl ***
|
|
||||||
(not used anymore)
|
|
||||||
*** Output of Markdown.pl (parsed) ***
|
|
||||||
(not used anymore)
|
|
|
@ -20,15 +20,3 @@ One 123
|
||||||
One 123
|
One 123
|
||||||
*** Output of to_s ***
|
*** Output of to_s ***
|
||||||
One 123
|
One 123
|
||||||
*** EOF ***
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
OK!
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
*** Output of Markdown.pl ***
|
|
||||||
(not used anymore)
|
|
||||||
*** Output of Markdown.pl (parsed) ***
|
|
||||||
(not used anymore)
|
|
|
@ -22,22 +22,10 @@ md_el(:document,[
|
||||||
])
|
])
|
||||||
],{},[])
|
],{},[])
|
||||||
*** Output of to_html ***
|
*** 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 ***
|
*** Output of to_latex ***
|
||||||
taking part in which involve , , ,
|
taking part in which involve , , ,
|
||||||
*** Output of to_md ***
|
*** Output of to_md ***
|
||||||
taking part in which involve , , ,
|
taking part in which involve , , ,
|
||||||
*** Output of to_s ***
|
*** Output of to_s ***
|
||||||
taking part in which involve , , ,
|
taking part in which involve , , ,
|
||||||
*** EOF ***
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
OK!
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
*** Output of Markdown.pl ***
|
|
||||||
(not used anymore)
|
|
||||||
*** Output of Markdown.pl (parsed) ***
|
|
||||||
(not used anymore)
|
|
|
@ -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>")
|
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 ***
|
*** Output of to_html ***
|
||||||
<div class='frame'>
|
<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>
|
<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>
|
</div>
|
||||||
*** Output of to_latex ***
|
*** Output of to_latex ***
|
||||||
|
|
||||||
|
@ -23,15 +23,3 @@ md_el(:document,[
|
||||||
|
|
||||||
*** Output of to_s ***
|
*** Output of to_s ***
|
||||||
|
|
||||||
*** EOF ***
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
OK!
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
*** Output of Markdown.pl ***
|
|
||||||
(not used anymore)
|
|
||||||
*** Output of Markdown.pl (parsed) ***
|
|
||||||
(not used anymore)
|
|
|
@ -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>")
|
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 ***
|
*** Output of to_html ***
|
||||||
<div class='frame'>
|
<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>
|
<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>
|
</div>
|
||||||
*** Output of to_latex ***
|
*** Output of to_latex ***
|
||||||
|
|
||||||
|
@ -21,15 +21,3 @@ md_el(:document,[
|
||||||
|
|
||||||
*** Output of to_s ***
|
*** Output of to_s ***
|
||||||
|
|
||||||
*** EOF ***
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
OK!
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
*** Output of Markdown.pl ***
|
|
||||||
(not used anymore)
|
|
||||||
*** Output of Markdown.pl (parsed) ***
|
|
||||||
(not used anymore)
|
|
|
@ -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"]])
|
md_el(:code,[],{:raw_code=>"<p>here's an apostrophe & a quote \"</p>"},[["html_use_syntax", "true"], ["lang", "xml"]])
|
||||||
],{},[])
|
],{},[])
|
||||||
*** Output of to_html ***
|
*** Output of to_html ***
|
||||||
<p><code><p>here's an apostrophe & a quote "</p></code></p>
|
<p><code><p>here's an apostrophe & a quote "</p></code></p>
|
||||||
|
|
||||||
<pre><code><p>here's an apostrophe & a quote "</p></code></pre>
|
<pre><code><p>here's an apostrophe & a quote "</p></code></pre>
|
||||||
|
|
||||||
<pre lang='xml'><code class='xml' lang='xml'><p>here's an apostrophe & a quote "</p></code></pre>
|
<pre class="xml"><code lang="xml"><p>here's an apostrophe & a quote "</p></code></pre>
|
||||||
|
|
||||||
<pre><code class='not_supported' lang='not_supported'><p>here's an apostrophe & a quote "</p></code></pre>
|
<pre class="not_supported"><code lang="not_supported"><p>here's an apostrophe & a quote "</p></code></pre>
|
||||||
|
|
||||||
<pre><code class='xml' lang='xml'><span class='punct'><</span><span class='tag'>p</span><span class='punct'>></span>here's an apostrophe & a quote "<span class='punct'></</span><span class='tag'>p</span><span class='punct'>></span></code></pre>
|
<pre class="xml"><code lang="xml"><span class="punct"><</span><span class="tag">p</span><span class="punct">></span>here's an apostrophe & a quote "<span class="punct"></</span><span class="tag">p</span><span class="punct">></span></code></pre>
|
||||||
*** Output of to_latex ***
|
*** 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}}
|
{\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 ***
|
*** Output of to_s ***
|
||||||
|
|
||||||
*** EOF ***
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
OK!
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
*** Output of Markdown.pl ***
|
|
||||||
(not used anymore)
|
|
||||||
*** Output of Markdown.pl (parsed) ***
|
|
||||||
(not used anymore)
|
|
|
@ -52,15 +52,15 @@ md_el(:document,[
|
||||||
md_ref_def("css2", "http://jigsaw.w3.org/css-validator/images/vcss", {:title=>"Optional title attribute"})
|
md_ref_def("css2", "http://jigsaw.w3.org/css-validator/images/vcss", {:title=>"Optional title attribute"})
|
||||||
],{},[])
|
],{},[])
|
||||||
*** Output of to_html ***
|
*** 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’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’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 ***
|
*** Output of to_latex ***
|
||||||
This page does not uilizes
|
This page does not uilizes
|
||||||
|
|
||||||
|
@ -88,15 +88,3 @@ This is double size:
|
||||||
Cascading Style Sheets
|
Cascading Style Sheets
|
||||||
*** Output of to_s ***
|
*** 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
|
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)
|
|
|
@ -16,9 +16,9 @@ md_el(:document,[
|
||||||
md_ref_def("image", "image.jpg", {:title=>nil})
|
md_ref_def("image", "image.jpg", {:title=>nil})
|
||||||
],{},[])
|
],{},[])
|
||||||
*** Output of to_html ***
|
*** 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 ***
|
*** Output of to_latex ***
|
||||||
This is an .
|
This is an .
|
||||||
|
|
||||||
|
@ -29,15 +29,3 @@ This is an image.
|
||||||
This is an image.
|
This is an image.
|
||||||
*** Output of to_s ***
|
*** Output of to_s ***
|
||||||
This is an image.This is an image.
|
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)
|
|
|
@ -71,14 +71,14 @@ md_el(:document,[
|
||||||
|
|
||||||
<p>Input:</p>
|
<p>Input:</p>
|
||||||
|
|
||||||
<pre><code><img src="http://jigsaw.w3.org/css-validator/images/vcss"/></code></pre>
|
<pre><code><img src="http://jigsaw.w3.org/css-validator/images/vcss"/></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>
|
<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>
|
<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>
|
||||||
<p>This is</p>
|
<p>This is</p>
|
||||||
<em>
|
<em>
|
||||||
|
@ -106,20 +106,8 @@ md_el(:document,[
|
||||||
</p>
|
</p>
|
||||||
</div><table>
|
</div><table>
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td><p>This is a</p><em><p>true</p></em><p>markdown text. (no par)</p></td>
|
||||||
<p>This is a</p>
|
<td><p>This is</p><em><p>true</p></em><p>markdown text. (par)</p></td>
|
||||||
<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>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
*** Output of to_latex ***
|
*** Output of to_latex ***
|
||||||
|
@ -150,15 +138,3 @@ Result alone:
|
||||||
Without closing:
|
Without closing:
|
||||||
*** Output of to_s ***
|
*** Output of to_s ***
|
||||||
Input:Result: Input:Result on span: Result alone:Without closing:
|
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)
|
|
|
@ -19,15 +19,3 @@ md_el(:document,[
|
||||||
|
|
||||||
*** Output of to_s ***
|
*** Output of to_s ***
|
||||||
|
|
||||||
*** EOF ***
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
OK!
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
*** Output of Markdown.pl ***
|
|
||||||
(not used anymore)
|
|
||||||
*** Output of Markdown.pl (parsed) ***
|
|
||||||
(not used anymore)
|
|
|
@ -81,28 +81,28 @@ md_el(:document,[
|
||||||
md_ref_def("google_images", "http://images.google.com", {:title=>"Google images"})
|
md_ref_def("google_images", "http://images.google.com", {:title=>"Google images"})
|
||||||
],{},[])
|
],{},[])
|
||||||
*** Output of to_html ***
|
*** 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'>bill@google.com</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">bill@google.com</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>
|
<p>And now <a href="http://images.google.com" title="Google images">reference-style link ID with spaces</a></p>
|
||||||
*** Output of to_latex ***
|
** Output of to_latex ***
|
||||||
Search on \href{http://www.google.com}{Google}
|
Search on \href{http://www.google.com}{Google}
|
||||||
|
|
||||||
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
|
reference-style link ID with spaces
|
||||||
*** Output of to_s ***
|
*** 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
|
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)
|
|
|
@ -20,15 +20,3 @@ See \href{http://agorf.gr/}{foo'{} bar}
|
||||||
See foo bar
|
See foo bar
|
||||||
*** Output of to_s ***
|
*** Output of to_s ***
|
||||||
See foo bar
|
See foo bar
|
||||||
*** EOF ***
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
OK!
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
*** Output of Markdown.pl ***
|
|
||||||
(not used anymore)
|
|
||||||
*** Output of Markdown.pl (parsed) ***
|
|
||||||
(not used anymore)
|
|
|
@ -44,15 +44,3 @@ This is a blockquote inside a list
|
||||||
item.
|
item.
|
||||||
*** Output of to_s ***
|
*** Output of to_s ***
|
||||||
A list item with a blockquote:This is a blockquote inside a list item.
|
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)
|
|
|
@ -15,7 +15,7 @@ md_el(:document,[
|
||||||
],{},[])
|
],{},[])
|
||||||
*** Output of to_html ***
|
*** Output of to_html ***
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href='http://maruku.org/'>Maruku</a>: good.</li>
|
<li><a href="http://maruku.org/">Maruku</a>: good.</li>
|
||||||
</ul>
|
</ul>
|
||||||
*** Output of to_latex ***
|
*** Output of to_latex ***
|
||||||
\begin{itemize}%
|
\begin{itemize}%
|
||||||
|
@ -26,15 +26,3 @@ md_el(:document,[
|
||||||
-aruku: good.
|
-aruku: good.
|
||||||
*** Output of to_s ***
|
*** Output of to_s ***
|
||||||
Maruku: good.
|
Maruku: good.
|
||||||
*** EOF ***
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
OK!
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
*** Output of Markdown.pl ***
|
|
||||||
(not used anymore)
|
|
||||||
*** Output of Markdown.pl (parsed) ***
|
|
||||||
(not used anymore)
|
|
|
@ -54,15 +54,3 @@ This is the second paragraph in the list item. Youre only required to indent the
|
||||||
-ther
|
-ther
|
||||||
*** Output of to_s ***
|
*** 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
|
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)
|
|
|
@ -62,15 +62,3 @@ item.
|
||||||
- list item with a code block:
|
- list item with a code block:
|
||||||
*** Output of to_s ***
|
*** 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:
|
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)
|
|
|
@ -87,15 +87,3 @@ This is a list:
|
||||||
This is not a list: 1987. one ciao
|
This is not a list: 1987. one ciao
|
||||||
*** Output of to_s ***
|
*** 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
|
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)
|
|
|
@ -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.
|
-nother item in the same list.
|
||||||
*** Output of to_s ***
|
*** 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.
|
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)
|
|
|
@ -10,14 +10,14 @@ List:
|
||||||
md_el(:document,[
|
md_el(:document,[
|
||||||
md_par(["List:"]),
|
md_par(["List:"]),
|
||||||
md_el(:ul,[
|
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 ***
|
*** Output of to_html ***
|
||||||
<p>List:</p>
|
<p>List:</p>
|
||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
<li>è<code>gcc</code></li>
|
<li>è<code>gcc</code></li>
|
||||||
</ul>
|
</ul>
|
||||||
*** Output of to_latex ***
|
*** Output of to_latex ***
|
||||||
List:
|
List:
|
||||||
|
@ -29,18 +29,6 @@ List:
|
||||||
*** Output of to_md ***
|
*** Output of to_md ***
|
||||||
List:
|
List:
|
||||||
|
|
||||||
-¨
|
- è`gcc`
|
||||||
*** Output of to_s ***
|
*** Output of to_s ***
|
||||||
List:è
|
List:è
|
||||||
*** EOF ***
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
OK!
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
*** Output of Markdown.pl ***
|
|
||||||
(not used anymore)
|
|
||||||
*** Output of Markdown.pl (parsed) ***
|
|
||||||
(not used anymore)
|
|
23
vendor/plugins/maruku/spec/block_docs/lists11.md
vendored
Normal file
23
vendor/plugins/maruku/spec/block_docs/lists11.md
vendored
Normal 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>ένα</li>
|
||||||
|
</ul>
|
||||||
|
*** Output of to_latex ***
|
||||||
|
\begin{itemize}%
|
||||||
|
\item ένα
|
||||||
|
|
||||||
|
\end{itemize}
|
||||||
|
*** Output of to_md ***
|
||||||
|
- ένα
|
||||||
|
*** Output of to_s ***
|
||||||
|
ένα
|
|
@ -39,15 +39,3 @@ md_el(:document,[],{},[])
|
||||||
|
|
||||||
*** Output of to_s ***
|
*** Output of to_s ***
|
||||||
|
|
||||||
*** EOF ***
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
OK!
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
*** Output of Markdown.pl ***
|
|
||||||
(not used anymore)
|
|
||||||
*** Output of Markdown.pl (parsed) ***
|
|
||||||
(not used anymore)
|
|
|
@ -62,15 +62,3 @@ md_el(:document,[
|
||||||
-ue
|
-ue
|
||||||
*** Output of to_s ***
|
*** Output of to_s ***
|
||||||
DuetretretreDue
|
DuetretretreDue
|
||||||
*** EOF ***
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
OK!
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
*** Output of Markdown.pl ***
|
|
||||||
(not used anymore)
|
|
||||||
*** Output of Markdown.pl (parsed) ***
|
|
||||||
(not used anymore)
|
|
|
@ -114,11 +114,11 @@ md_el(:document,[
|
||||||
|
|
||||||
<p>Paragraph with header:</p>
|
<p>Paragraph with header:</p>
|
||||||
|
|
||||||
<h3 id='header'>header</h3>
|
<h3 id="header_1">header</h3>
|
||||||
|
|
||||||
<p>Paragraph with header on two lines:</p>
|
<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>
|
||||||
|
|
||||||
|
@ -153,11 +153,11 @@ Quoted
|
||||||
\end{quote}
|
\end{quote}
|
||||||
Paragraph with header:
|
Paragraph with header:
|
||||||
|
|
||||||
\hypertarget{header}{}\subsubsection*{{header}}\label{header}
|
\hypertarget{header_1}{}\subsubsection*{{header}}\label{header_1}
|
||||||
|
|
||||||
Paragraph with header on two lines:
|
Paragraph with header on two lines:
|
||||||
|
|
||||||
\hypertarget{header}{}\subsection*{{header}}\label{header}
|
\hypertarget{header_2}{}\subsection*{{header}}\label{header_2}
|
||||||
|
|
||||||
Paragraph with html after
|
Paragraph with html after
|
||||||
|
|
||||||
|
@ -206,15 +206,3 @@ tralla
|
||||||
Paragraph with html after, indented:
|
Paragraph with html after, indented:
|
||||||
*** Output of to_s ***
|
*** 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:
|
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)
|
|
|
@ -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.
|
-nother item in the same list.
|
||||||
*** Output of to_s ***
|
*** 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.
|
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)
|
|
|
@ -14,15 +14,3 @@ md_el(:document,[md_html("<br />")],{},[])
|
||||||
|
|
||||||
*** Output of to_s ***
|
*** Output of to_s ***
|
||||||
|
|
||||||
*** EOF ***
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
OK!
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
*** Output of Markdown.pl ***
|
|
||||||
(not used anymore)
|
|
||||||
*** Output of Markdown.pl (parsed) ***
|
|
||||||
(not used anymore)
|
|
45
vendor/plugins/maruku/spec/block_docs/math/equations.md
vendored
Normal file
45
vendor/plugins/maruku/spec/block_docs/math/equations.md
vendored
Normal 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 ***
|
||||||
|
|
|
@ -44,15 +44,3 @@ Here are some formulas:
|
||||||
That s it, nothing else is supported.
|
That s it, nothing else is supported.
|
||||||
*** Output of to_s ***
|
*** Output of to_s ***
|
||||||
Here are some formulas:Thats it, nothing else is supported.
|
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)
|
|
45
vendor/plugins/maruku/spec/block_docs/math/math2.md
vendored
Normal file
45
vendor/plugins/maruku/spec/block_docs/math/math2.md
vendored
Normal 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>α</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>α</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>β</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>γ</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 ***
|
||||||
|
|
|
@ -23,15 +23,3 @@ This is not $math$.
|
||||||
[ \alpha ]
|
[ \alpha ]
|
||||||
*** Output of to_s ***
|
*** Output of to_s ***
|
||||||
This is not $math$.[ \alpha ]
|
This is not $math$.[ \alpha ]
|
||||||
*** EOF ***
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
OK!
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
*** Output of Markdown.pl ***
|
|
||||||
(not used anymore)
|
|
||||||
*** Output of Markdown.pl (parsed) ***
|
|
||||||
(not used anymore)
|
|
|
@ -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>")
|
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 ***
|
*** Output of to_html ***
|
||||||
<table><math class='maruku-mathml' display='inline' xmlns='http://www.w3.org/1998/Math/MathML'><mi>α</mi></math><thead>
|
<table><math xmlns="http://www.w3.org/1998/Math/MathML" display="inline" class="maruku-mathml"><mi>α</mi></math><thead>
|
||||||
<td><math class='maruku-mathml' display='inline' xmlns='http://www.w3.org/1998/Math/MathML'><mi>β</mi></math></td>
|
<td><math xmlns="http://www.w3.org/1998/Math/MathML" display="inline" class="maruku-mathml"><mi>β</mi></math></td>
|
||||||
</thead>
|
</thead>
|
||||||
</table>
|
</table>
|
||||||
*** Output of to_latex ***
|
*** Output of to_latex ***
|
||||||
|
@ -23,15 +23,3 @@ md_el(:document,[
|
||||||
|
|
||||||
*** Output of to_s ***
|
*** Output of to_s ***
|
||||||
|
|
||||||
*** EOF ***
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
OK!
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
*** Output of Markdown.pl ***
|
|
||||||
(not used anymore)
|
|
||||||
*** Output of Markdown.pl (parsed) ***
|
|
||||||
(not used anymore)
|
|
|
@ -26,8 +26,8 @@ md_el(:document,[
|
||||||
md_el(:ald,[],{:ald=>[["scope", "row"]],:ald_id=>"r"},[])
|
md_el(:ald,[],{:ald=>[["scope", "row"]],:ald_id=>"r"},[])
|
||||||
],{},[])
|
],{},[])
|
||||||
*** Output of to_html ***
|
*** 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;'> α</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;"> α</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;'> ℵ</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;"> ℵ</th><td style="text-align: left;">The first</td><td style="text-align: left;">I like it.</td>
|
||||||
</tr></tbody></table>
|
</tr></tbody></table>
|
||||||
*** Output of to_latex ***
|
*** Output of to_latex ***
|
||||||
\begin{tabular}{l|l|l}
|
\begin{tabular}{l|l|l}
|
||||||
|
@ -40,15 +40,3 @@ Symbol&Meaning&comments\\
|
||||||
SymbolMeaningcomments The firstI like it. The firstI like it.
|
SymbolMeaningcomments The firstI like it. The firstI like it.
|
||||||
*** Output of to_s ***
|
*** Output of to_s ***
|
||||||
SymbolMeaningcomments The firstI like it. The firstI like it.
|
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)
|
|
|
@ -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})
|
md_ref_def("javagenerics", "http://java.sun.com/j2se/1.5.0/docs/guide/language/generics.html", {:title=>nil})
|
||||||
],{},[])
|
],{},[])
|
||||||
*** Output of to_html ***
|
*** Output of to_html ***
|
||||||
<h3 id='general'>General</h3>
|
<h3 id="general_1">General</h3>
|
||||||
|
|
||||||
<ul>
|
<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>, “search, don’t sort” really works.</li>
|
<li><em>Email</em>: <a href="http://gmail.com/">GMail</a>, “search, don’t sort” really works.</li>
|
||||||
|
|
||||||
<li><em>Text Editor</em>: <a href='http://www.apple.com/getamac/'>TextMate</a>, 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 <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’s worth every penny. There are rumours that it’s been converting (recovering) Emacs users (addicts). Unfortunately, it’s Mac only. An alternative is <a href="http://www.jedit.org/">jedit</a> (GPL, Java).</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<h3 id='development'>Development</h3>
|
<h3 id="development_2">Development</h3>
|
||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
<li>
|
<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>
|
||||||
|
|
||||||
<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>
|
||||||
|
|
||||||
<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>
|
||||||
|
|
||||||
<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
|
<pre><code>$ python
|
||||||
Python 2.4.1 (\#1, Jun 4 2005, 00:54:33)
|
Python 2.4.1 (\#1, Jun 4 2005, 00:54:33)
|
||||||
Type "help", "copyright", "credits" or "license" for more information.
|
Type "help", "copyright", "credits" or "license" for more information.
|
||||||
>>> exit
|
>>> exit
|
||||||
'Use Ctrl-D (i.e. EOF) to exit.'
|
'Use Ctrl-D (i.e. EOF) to exit.'
|
||||||
>>> quit
|
>>> quit
|
||||||
'Use Ctrl-D (i.e. EOF) to exit.'</code></pre>
|
'Use Ctrl-D (i.e. EOF) to exit.'</code></pre>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<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>
|
||||||
|
|
||||||
<li>
|
<li>
|
||||||
<p><em>Mark-up language</em>: HTML is so 2001, why don’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’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>
|
||||||
|
|
||||||
<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>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<h3 id='research'>Research</h3>
|
<h3 id="research_3">Research</h3>
|
||||||
|
|
||||||
<ul>
|
<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 & enjoying the process</em>: <a href='http://www.lyx.org'>LyX</a></li>
|
<li><em>Writing papers & 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>
|
</ul>
|
||||||
|
|
||||||
<h3 id='cool_websites'>Cool websites</h3>
|
<h3 id="cool_websites_4">Cool websites</h3>
|
||||||
|
|
||||||
<ul>
|
<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>
|
</ul>
|
||||||
*** Output of to_latex ***
|
*** Output of to_latex ***
|
||||||
\hypertarget{general}{}\subsubsection*{{General}}\label{general}
|
\hypertarget{general_1}{}\subsubsection*{{General}}\label{general_1}
|
||||||
|
|
||||||
\begin{itemize}%
|
\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.
|
\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 "help", "copyright", "credits" or "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).
|
\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}
|
\end{itemize}
|
||||||
\hypertarget{development}{}\subsubsection*{{Development}}\label{development}
|
\hypertarget{development_2}{}\subsubsection*{{Development}}\label{development_2}
|
||||||
|
|
||||||
\begin{itemize}%
|
\begin{itemize}%
|
||||||
\item \emph{Build system}: \href{http://www.cmake.org/}{cmake}, throw the \href{http://sources.redhat.com/autobook/}{autotools} away.
|
\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}
|
\end{itemize}
|
||||||
\hypertarget{research}{}\subsubsection*{{Research}}\label{research}
|
\hypertarget{research_3}{}\subsubsection*{{Research}}\label{research_3}
|
||||||
|
|
||||||
\begin{itemize}%
|
\begin{itemize}%
|
||||||
\item \emph{Writing papers}: \href{http://en.wikipedia.org/wiki/LaTeX}{LaTeX}
|
\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}.
|
\item \emph{IEEExplore and BibTeX}: convert citations using \href{http://www.bibconverter.net/ieeexplore/}{BibConverter}.
|
||||||
|
|
||||||
\end{itemize}
|
\end{itemize}
|
||||||
\hypertarget{cool_websites}{}\subsubsection*{{Cool websites}}\label{cool_websites}
|
\hypertarget{cool_websites_4}{}\subsubsection*{{Cool websites}}\label{cool_websites_4}
|
||||||
|
|
||||||
\begin{itemize}%
|
\begin{itemize}%
|
||||||
\item \emph{Best site in the wwworld}: \href{http://en.wikipedia.org/}{Wikipedia}
|
\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.
|
API you can use.
|
||||||
*** Output of to_s ***
|
*** 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.
|
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)
|
|
|
@ -19,15 +19,3 @@ md_el(:document,[md_par([md_code("\\\\")]), md_par([md_code("\\")])],{},[])
|
||||||
|
|
||||||
*** Output of to_s ***
|
*** Output of to_s ***
|
||||||
|
|
||||||
*** EOF ***
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
OK!
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
*** Output of Markdown.pl ***
|
|
||||||
(not used anymore)
|
|
||||||
*** Output of Markdown.pl (parsed) ***
|
|
||||||
(not used anymore)
|
|
|
@ -25,27 +25,27 @@ md_el(:document,[
|
||||||
*** Output of to_html ***
|
*** Output of to_html ***
|
||||||
<p>Paragraph</p>
|
<p>Paragraph</p>
|
||||||
|
|
||||||
<h3 id='header'>header</h3>
|
<h3 id="header_1">header</h3>
|
||||||
|
|
||||||
<p>Paragraph</p>
|
<p>Paragraph</p>
|
||||||
|
|
||||||
<h2 id='header'>header</h2>
|
<h2 id="header_2">header</h2>
|
||||||
|
|
||||||
<p>Paragraph</p>
|
<p>Paragraph</p>
|
||||||
|
|
||||||
<h1 id='header'>header</h1>
|
<h1 id="header_3">header</h1>
|
||||||
*** Output of to_latex ***
|
*** Output of to_latex ***
|
||||||
Paragraph
|
Paragraph
|
||||||
|
|
||||||
\hypertarget{header}{}\subsubsection*{{header}}\label{header}
|
\hypertarget{header_1}{}\subsubsection*{{header}}\label{header_1}
|
||||||
|
|
||||||
Paragraph
|
Paragraph
|
||||||
|
|
||||||
\hypertarget{header}{}\subsection*{{header}}\label{header}
|
\hypertarget{header_2}{}\subsection*{{header}}\label{header_2}
|
||||||
|
|
||||||
Paragraph
|
Paragraph
|
||||||
|
|
||||||
\hypertarget{header}{}\section*{{header}}\label{header}
|
\hypertarget{header_3}{}\section*{{header}}\label{header_3}
|
||||||
*** Output of to_md ***
|
*** Output of to_md ***
|
||||||
Paragraph
|
Paragraph
|
||||||
|
|
||||||
|
@ -56,15 +56,3 @@ headerParagraph
|
||||||
header
|
header
|
||||||
*** Output of to_s ***
|
*** Output of to_s ***
|
||||||
ParagraphheaderParagraphheaderParagraphheader
|
ParagraphheaderParagraphheaderParagraphheader
|
||||||
*** EOF ***
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
OK!
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
*** Output of Markdown.pl ***
|
|
||||||
(not used anymore)
|
|
||||||
*** Output of Markdown.pl (parsed) ***
|
|
||||||
(not used anymore)
|
|
|
@ -16,15 +16,3 @@ md_el(:document,[md_par([md_code("There is a literal backtick (`) here.")])],{},
|
||||||
|
|
||||||
*** Output of to_s ***
|
*** Output of to_s ***
|
||||||
|
|
||||||
*** EOF ***
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
OK!
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
*** Output of Markdown.pl ***
|
|
||||||
(not used anymore)
|
|
||||||
*** Output of Markdown.pl (parsed) ***
|
|
||||||
(not used anymore)
|
|
|
@ -86,11 +86,11 @@ md_el(:document,[
|
||||||
|
|
||||||
<p>Paragraph with header:</p>
|
<p>Paragraph with header:</p>
|
||||||
|
|
||||||
<h3 id='header'>header</h3>
|
<h3 id="header_1">header</h3>
|
||||||
|
|
||||||
<p>Paragraph with header on two lines:</p>
|
<p>Paragraph with header on two lines:</p>
|
||||||
|
|
||||||
<h2 id='header'>header</h2>
|
<h2 id="header_2">header</h2>
|
||||||
*** Output of to_latex ***
|
*** Output of to_latex ***
|
||||||
Paragraph, list with no space: * ciao
|
Paragraph, list with no space: * ciao
|
||||||
|
|
||||||
|
@ -117,11 +117,11 @@ Quoted
|
||||||
\end{quote}
|
\end{quote}
|
||||||
Paragraph with header:
|
Paragraph with header:
|
||||||
|
|
||||||
\hypertarget{header}{}\subsubsection*{{header}}\label{header}
|
\hypertarget{header_1}{}\subsubsection*{{header}}\label{header_1}
|
||||||
|
|
||||||
Paragraph with header on two lines:
|
Paragraph with header on two lines:
|
||||||
|
|
||||||
\hypertarget{header}{}\subsection*{{header}}\label{header}
|
\hypertarget{header_2}{}\subsection*{{header}}\label{header_2}
|
||||||
*** Output of to_md ***
|
*** Output of to_md ***
|
||||||
Paragraph, list with no space: * ciao
|
Paragraph, list with no space: * ciao
|
||||||
|
|
||||||
|
@ -155,15 +155,3 @@ headerParagraph with header on two lines:
|
||||||
header
|
header
|
||||||
*** Output of to_s ***
|
*** 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
|
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)
|
|
|
@ -43,15 +43,3 @@ This is a list:
|
||||||
3. three
|
3. three
|
||||||
*** Output of to_s ***
|
*** Output of to_s ***
|
||||||
This is a list:onetwothree
|
This is a list:onetwothree
|
||||||
*** EOF ***
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
OK!
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
*** Output of Markdown.pl ***
|
|
||||||
(not used anymore)
|
|
||||||
*** Output of Markdown.pl (parsed) ***
|
|
||||||
(not used anymore)
|
|
|
@ -13,15 +13,3 @@ One line
|
||||||
One line
|
One line
|
||||||
*** Output of to_s ***
|
*** Output of to_s ***
|
||||||
One line
|
One line
|
||||||
*** EOF ***
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
OK!
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
*** Output of Markdown.pl ***
|
|
||||||
(not used anymore)
|
|
||||||
*** Output of Markdown.pl (parsed) ***
|
|
||||||
(not used anymore)
|
|
|
@ -14,15 +14,3 @@ Paragraph
|
||||||
Paragraph
|
Paragraph
|
||||||
*** Output of to_s ***
|
*** Output of to_s ***
|
||||||
Paragraph
|
Paragraph
|
||||||
*** EOF ***
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
OK!
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
*** Output of Markdown.pl ***
|
|
||||||
(not used anymore)
|
|
||||||
*** Output of Markdown.pl (parsed) ***
|
|
||||||
(not used anymore)
|
|
|
@ -40,15 +40,3 @@ Paragraph
|
||||||
Paragraph
|
Paragraph
|
||||||
*** Output of to_s ***
|
*** Output of to_s ***
|
||||||
ParagraphParagraphParagraph
|
ParagraphParagraphParagraph
|
||||||
*** EOF ***
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
OK!
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
*** Output of Markdown.pl ***
|
|
||||||
(not used anymore)
|
|
||||||
*** Output of Markdown.pl (parsed) ***
|
|
||||||
(not used anymore)
|
|
|
@ -22,15 +22,3 @@ Paragraph1
|
||||||
Paragraph2
|
Paragraph2
|
||||||
*** Output of to_s ***
|
*** Output of to_s ***
|
||||||
Paragraph1Paragraph2
|
Paragraph1Paragraph2
|
||||||
*** EOF ***
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
OK!
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
*** Output of Markdown.pl ***
|
|
||||||
(not used anymore)
|
|
||||||
*** Output of Markdown.pl (parsed) ***
|
|
||||||
(not used anymore)
|
|
|
@ -44,15 +44,3 @@ Paragraph 3 Paragraph 4 Paragraph Br->
|
||||||
Paragraph 5
|
Paragraph 5
|
||||||
*** Output of to_s ***
|
*** Output of to_s ***
|
||||||
Paragraph 1Paragraph 2Paragraph 3 Paragraph 4 Paragraph Br->Paragraph 5
|
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)
|
|
|
@ -13,15 +13,3 @@ md_el(:document,[md_el(:code,[],{:raw_code=>"@articles.map(&:title)"},[])],{},[]
|
||||||
|
|
||||||
*** Output of to_s ***
|
*** Output of to_s ***
|
||||||
|
|
||||||
*** EOF ***
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
OK!
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
*** Output of Markdown.pl ***
|
|
||||||
(not used anymore)
|
|
||||||
*** Output of Markdown.pl (parsed) ***
|
|
||||||
(not used anymore)
|
|
|
@ -21,8 +21,8 @@ md_el(:document,[
|
||||||
],{:align=>[:left, :left, :left]},[])
|
],{:align=>[:left, :left, :left]},[])
|
||||||
],{},[])
|
],{},[])
|
||||||
*** Output of to_html ***
|
*** 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;' />
|
<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><tr><td style="text-align: left;">B</td><td style="text-align: left;"/><td style="text-align: left;">X</td>
|
||||||
</tr></tbody></table>
|
</tr></tbody></table>
|
||||||
*** Output of to_latex ***
|
*** Output of to_latex ***
|
||||||
\begin{tabular}{l|l|l}
|
\begin{tabular}{l|l|l}
|
||||||
|
@ -35,15 +35,3 @@ B&&X\\
|
||||||
12AXBX
|
12AXBX
|
||||||
*** Output of to_s ***
|
*** Output of to_s ***
|
||||||
12AXBX
|
12AXBX
|
||||||
*** EOF ***
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
OK!
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
*** Output of Markdown.pl ***
|
|
||||||
(not used anymore)
|
|
||||||
*** Output of Markdown.pl (parsed) ***
|
|
||||||
(not used anymore)
|
|
|
@ -32,21 +32,21 @@ md_el(:document,[
|
||||||
md_el(:code,[],{:raw_code=>"<a@invalid.it>"},[])
|
md_el(:code,[],{:raw_code=>"<a@invalid.it>"},[])
|
||||||
],{},[])
|
],{},[])
|
||||||
*** Output of to_html ***
|
*** 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><http://www.dd.com></code></pre>
|
<pre><code><http://www.dd.com></code></pre>
|
||||||
|
|
||||||
<p><a href='mailto:a@invalid.it'>a@invalid.it</a></p>
|
<p><a href="mailto:a@invalid.it">a@invalid.it</a></p>
|
||||||
|
|
||||||
<p><a href='mailto:a@invalid.it'>a@invalid.it</a></p>
|
<p><a href="mailto:a@invalid.it">a@invalid.it</a></p>
|
||||||
|
|
||||||
<p><a href='mailto:a@invalid.it'>a@invalid.it</a></p>
|
<p><a href="mailto:a@invalid.it">a@invalid.it</a></p>
|
||||||
|
|
||||||
<pre><code><a@invalid.it></code></pre>
|
<pre><code><a@invalid.it></code></pre>
|
||||||
*** Output of to_latex ***
|
*** Output of to_latex ***
|
||||||
|
@ -70,15 +70,3 @@ md_el(:document,[
|
||||||
|
|
||||||
*** Output of to_s ***
|
*** Output of to_s ***
|
||||||
|
|
||||||
*** EOF ***
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
OK!
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
*** Output of Markdown.pl ***
|
|
||||||
(not used anymore)
|
|
||||||
*** Output of Markdown.pl (parsed) ***
|
|
||||||
(not used anymore)
|
|
|
@ -12,22 +12,10 @@ md_el(:document,[
|
||||||
md_ref_def("a_b", "http://site.com/", {:title=>nil})
|
md_ref_def("a_b", "http://site.com/", {:title=>nil})
|
||||||
],{},[])
|
],{},[])
|
||||||
*** Output of to_html ***
|
*** 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 ***
|
*** Output of to_latex ***
|
||||||
\href{http://site.com/}{a. b} is a link.
|
\href{http://site.com/}{a. b} is a link.
|
||||||
*** Output of to_md ***
|
*** Output of to_md ***
|
||||||
a. bis a link.
|
a. bis a link.
|
||||||
*** Output of to_s ***
|
*** Output of to_s ***
|
||||||
a. b is a link.
|
a. b is a link.
|
||||||
*** EOF ***
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
OK!
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
*** Output of Markdown.pl ***
|
|
||||||
(not used anymore)
|
|
||||||
*** Output of Markdown.pl (parsed) ***
|
|
||||||
(not used anymore)
|
|
|
@ -13,15 +13,3 @@ Search on Google images
|
||||||
Search on Google images
|
Search on Google images
|
||||||
*** Output of to_s ***
|
*** Output of to_s ***
|
||||||
Search on Google images
|
Search on Google images
|
||||||
*** EOF ***
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
OK!
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
*** Output of Markdown.pl ***
|
|
||||||
(not used anymore)
|
|
||||||
*** Output of Markdown.pl (parsed) ***
|
|
||||||
(not used anymore)
|
|
679
vendor/plugins/maruku/spec/block_docs/red_tests/abbrev.md
vendored
Normal file
679
vendor/plugins/maruku/spec/block_docs/red_tests/abbrev.md
vendored
Normal file
File diff suppressed because one or more lines are too long
32
vendor/plugins/maruku/spec/block_docs/red_tests/lists7.md
vendored
Normal file
32
vendor/plugins/maruku/spec/block_docs/red_tests/lists7.md
vendored
Normal 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
|
65
vendor/plugins/maruku/spec/block_docs/red_tests/lists7b.md
vendored
Normal file
65
vendor/plugins/maruku/spec/block_docs/red_tests/lists7b.md
vendored
Normal 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
|
|
@ -40,37 +40,3 @@ Here is a paragraph.
|
||||||
-tem 3
|
-tem 3
|
||||||
*** Output of to_s ***
|
*** Output of to_s ***
|
||||||
Here is a paragraph.Item 1Item 2Item 3
|
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)
|
|
23
vendor/plugins/maruku/spec/block_docs/red_tests/ref.md
vendored
Normal file
23
vendor/plugins/maruku/spec/block_docs/red_tests/ref.md
vendored
Normal 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
Loading…
Reference in a new issue