maruku 0.5.2 → 0.5.3

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile ADDED
@@ -0,0 +1,73 @@
1
+ require 'rubygems'
2
+ Gem::manage_gems
3
+ require 'rake/gempackagetask'
4
+
5
+ require 'maruku_gem'
6
+
7
+ task :default => [:package]
8
+
9
+ Rake::GemPackageTask.new($spec) do |pkg|
10
+ pkg.need_zip = true
11
+ pkg.need_tar = true
12
+ end
13
+
14
+ PKG_NAME = 'maruku'
15
+ PKG_FILE_NAME = "#{PKG_NAME}-#{MaRuKu::Version}"
16
+ RUBY_FORGE_PROJECT = PKG_NAME
17
+ RUBY_FORGE_USER = 'andrea'
18
+
19
+ RELEASE_NAME = MaRuKu::Version
20
+ RUBY_FORGE_GROUPID = '2795'
21
+ RUBY_FORGE_PACKAGEID = '3292'
22
+
23
+ desc "Publish the release files to RubyForge."
24
+ task :release => [:gem, :package] do
25
+ system("rubyforge login --username #{RUBY_FORGE_USER}")
26
+
27
+ gem = "pkg/#{PKG_FILE_NAME}.gem"
28
+ # -n notes/#{Maruku::Version}.txt
29
+ cmd = "rubyforge add_release %s %s \"%s\" %s" %
30
+ [RUBY_FORGE_GROUPID, RUBY_FORGE_PACKAGEID, RELEASE_NAME, gem]
31
+
32
+ puts cmd
33
+ system(cmd)
34
+
35
+ files = ["gem", "tgz", "zip"].map { |ext| "pkg/#{PKG_FILE_NAME}.#{ext}" }
36
+ files.each do |file|
37
+ # system("rubyforge add_file %s %s %s %s" %
38
+ # [RUBY_FORGE_GROUPID, RUBY_FORGE_PACKAGEID, RELEASE_NAME, file])
39
+ end
40
+ end
41
+
42
+ task :test => [:markdown_span_tests, :markdown_block_tests]
43
+
44
+ task :markdown_block_tests do
45
+ tests = Dir['tests/unittest/**/*.md'].join(' ')
46
+ puts "Executing tests #{tests}"
47
+ # ok = marutest(tests)
48
+ ok = system "ruby -Ilib bin/marutest #{tests}"
49
+ raise "Failed block unittest" if not ok
50
+ end
51
+
52
+ task :markdown_span_tests do
53
+ ok = system( "ruby -Ilib lib/maruku/tests/new_parser.rb v b")
54
+ raise "Failed span unittest" if not ok
55
+ end
56
+
57
+ require 'rake/rdoctask'
58
+
59
+ Rake::RDocTask.new do |rdoc|
60
+ files = [#'README', 'LICENSE', 'COPYING',
61
+ 'lib/**/*.rb',
62
+ 'rdoc/*.rdoc'#, 'test/*.rb'
63
+ ]
64
+ rdoc.rdoc_files.add(files)
65
+ rdoc.main = "rdoc/main.rdoc" # page to start on
66
+ rdoc.title = "Maruku Documentation"
67
+ rdoc.template = "jamis.rb"
68
+ rdoc.rdoc_dir = 'doc' # rdoc output folder
69
+ rdoc.options << '--line-numbers' << '--inline-source'
70
+ end
71
+
72
+
73
+
data/bin/marutest CHANGED
@@ -223,9 +223,7 @@ def passed?(args, arg)
223
223
  end
224
224
  end
225
225
 
226
- def marutest
227
- args = ARGV.clone
228
-
226
+ def marutest(args)
229
227
  dont_worry = []
230
228
  TOTEST.each do |x|
231
229
  arg = "ok:#{x}"
@@ -248,7 +246,8 @@ def marutest
248
246
  relaxed = {}
249
247
 
250
248
  args.each do |f|
251
- $stdout.write "#{f}\n\t\t"
249
+ $stdout.write f + ' '*(50-f.size) + " "
250
+ $stdout.flush
252
251
  tf, tr, tcrashed = run_test(f, dont_worry)
253
252
 
254
253
  tf = tf + tcrashed
@@ -282,7 +281,7 @@ def marutest
282
281
 
283
282
  if failed.size > 0
284
283
  failed.each do |file, fl|
285
- num_failed += failed.size
284
+ num_failed += fl.size
286
285
  if fl.size > 0
287
286
  puts "\t#{file}\tfailed on #{fl.inspect}"
288
287
  end
@@ -313,15 +312,16 @@ def marutest
313
312
  end
314
313
  end
315
314
 
316
- num_failed
315
+ return num_failed == 0
317
316
  end
318
317
 
319
-
320
- if ARGV.empty?
321
- puts "marutest is a tool for running Maruku's unittest."
322
- exit
318
+ if File.basename(__FILE__) == 'marutest'
319
+ if ARGV.empty?
320
+ puts "marutest is a tool for running Maruku's unittest."
321
+ exit 1
322
+ end
323
+ ok = marutest(ARGV.clone)
324
+
325
+ exit ok ? 0 : -1
323
326
  end
324
327
 
325
- marutest
326
-
327
-
data/docs/changelog.html CHANGED
@@ -80,13 +80,45 @@ Maruku (to_latex): parsing 4.04 sec + rendering 1.12 sec = 5.16 sec</code></pre>
80
80
  </li>
81
81
 
82
82
  <li>
83
- <p>There are a couple of hidden features&#8230;</p>
83
+ <p>There are a couple of hidden, unsafe, features that are not enabled by default.</p>
84
84
  </li>
85
85
  </ul>
86
86
  </li>
87
87
  </ul>
88
88
 
89
- <h4 id='stable'>Changes in 0.5.1</h4>
89
+ <h4 id='stable'>Changes in 0.5.3</h4>
90
+
91
+ <ul>
92
+ <li>
93
+ <p>Features:</p>
94
+
95
+ <ul>
96
+ <li>
97
+ <p><a href='http://www.w3.org/TR/html4/struct/tables.html#h-11.2.1'>All HTML <code>table</code> attributes</a> can be used (<code>summary</code>, <code>width</code>, <code>frame</code>, <code>rules</code>, <code>border</code>, <code>cellspacing</code>, <code>cellpadding</code>).</p>
98
+
99
+ <p>The next version will hopefully use all HTML attributes.</p>
100
+ </li>
101
+ </ul>
102
+ <!-- A version of Markdown that is more Japanese or something --></li>
103
+
104
+ <li>
105
+ <p>Bug fixes:</p>
106
+
107
+ <ul>
108
+ <li>
109
+ <p>Crash on this line: (found by Aggelos Orfanakos)</p>
110
+
111
+ <pre><code>[test][]:</code></pre>
112
+ </li>
113
+
114
+ <li>
115
+ <p>Regression with attribute system (found by Charles)</p>
116
+ </li>
117
+ </ul>
118
+ </li>
119
+ </ul>
120
+
121
+ <h4 id='changes_in_051'>Changes in 0.5.1</h4>
90
122
 
91
123
  <ul>
92
124
  <li>
@@ -380,4 +412,4 @@ Maruku (to_latex): parsing 0.49 sec + rendering 0.25 sec = 0.73 sec</code></pr
380
412
  <p>Support for images in PDF.</p>
381
413
  </li>
382
414
  </ul>
383
- <div class='maruku_signature'><hr /><span style='font-size: small; font-style: italic'>Created by <a href='http://maruku.rubyforge.org' title='Maruku: a Markdown-superset interpreter for Ruby'>Maruku</a> at 14:05 on Wednesday, January 24th, 2007.</span></div></body></html>
415
+ <div class='maruku_signature'><hr /><span style='font-size: small; font-style: italic'>Created by <a href='http://maruku.rubyforge.org' title='Maruku: a Markdown-superset interpreter for Ruby'>Maruku</a> at 15:31 on Monday, February 05th, 2007.</span></div></body></html>
data/docs/changelog.md CHANGED
@@ -58,10 +58,29 @@ HTML use syntax: true
58
58
  * Created the embryo of an extension system. Please don't use it
59
59
  yet, as probably the API is bound to change.
60
60
 
61
- * There are a couple of hidden features...
61
+ * There are a couple of hidden, unsafe, features that are not enabled by default.
62
62
 
63
+ #### Changes in 0.5.3 #### {#stable}
63
64
 
64
- #### Changes in 0.5.1 #### {#stable}
65
+ * Features:
66
+
67
+ * [All HTML `table` attributes](http://www.w3.org/TR/html4/struct/tables.html#h-11.2.1)
68
+ can be used (`summary`, `width`, `frame`, `rules`,
69
+ `border`, `cellspacing`, `cellpadding`).
70
+
71
+ The next version will hopefully use all HTML attributes.
72
+
73
+ <!-- A version of Markdown that is more Japanese or something -->
74
+
75
+ * Bug fixes:
76
+
77
+ * Crash on this line: (found by Aggelos Orfanakos)
78
+
79
+ [test][]:
80
+
81
+ * Regression with attribute system (found by Charles)
82
+
83
+ #### Changes in 0.5.1 ####
65
84
 
66
85
  * Bug fixes:
67
86
 
@@ -255,4 +255,4 @@
255
255
  &#160;&#160;&#160;<code style='background-color: #eef;'>&amp;mu;</code> &#956; (<code style='background-color: #ffe;'>$\mu$</code>)
256
256
  &#160;&#160;&#160;<code style='background-color: #eef;'>&amp;hellip;</code> &#8230; (<code style='background-color: #ffe;'>\ldots</code>)
257
257
  &#160;&#160;&#160;</p>
258
- <div class='maruku_signature'><hr /><span style='font-size: small; font-style: italic'>Created by <a href='http://maruku.rubyforge.org' title='Maruku: a Markdown-superset interpreter for Ruby'>Maruku</a> at 13:49 on Wednesday, January 24th, 2007.</span></div></body></html>
258
+ <div class='maruku_signature'><hr /><span style='font-size: small; font-style: italic'>Created by <a href='http://maruku.rubyforge.org' title='Maruku: a Markdown-superset interpreter for Ruby'>Maruku</a> at 14:11 on Monday, February 05th, 2007.</span></div></body></html>
data/docs/exd.html CHANGED
@@ -53,7 +53,7 @@ Expanded documentation (Markdown format)
53
53
 
54
54
  <p class='maruku-att-default'>Default: <code>false</code></p>
55
55
 
56
- <p class='maruku-att-origin'>Read from file <code>output/to_latex.rb</code>, line 193:</p>
56
+ <p class='maruku-att-origin'>Read from file <code>output/to_latex.rb</code>, line 192:</p>
57
57
 
58
58
  <p>If <code>true</code>, shows spaces and tabs in code blocks.</p>
59
59
 
@@ -198,7 +198,7 @@ Latex preamble: preamble.tex
198
198
 
199
199
  <p class='maruku-att-default'>Default: <code>false</code></p>
200
200
 
201
- <p class='maruku-att-origin'>Read from file <code>output/to_latex.rb</code>, line 218:</p>
201
+ <p class='maruku-att-origin'>Read from file <code>output/to_latex.rb</code>, line 217:</p>
202
202
 
203
203
  <p>If the <code>latex_use_listings</code> attribute is specified, then code block are rendered using the <code>listings</code> package. Otherwise, a standard <code>verbatim</code> environment is used.</p>
204
204
 
@@ -285,4 +285,4 @@ Content
285
285
  <p>If <code>true</code>, section headers will be numbered.</p>
286
286
 
287
287
  <p>In LaTeX export, the numbering of headers is managed by Maruku, to have the same results in both HTML and LaTeX.</p>
288
- <div class='maruku_signature'><hr /><span style='font-size: small; font-style: italic'>Created by <a href='http://maruku.rubyforge.org' title='Maruku: a Markdown-superset interpreter for Ruby'>Maruku</a> at 13:49 on Wednesday, January 24th, 2007.</span></div></body></html>
288
+ <div class='maruku_signature'><hr /><span style='font-size: small; font-style: italic'>Created by <a href='http://maruku.rubyforge.org' title='Maruku: a Markdown-superset interpreter for Ruby'>Maruku</a> at 14:11 on Monday, February 05th, 2007.</span></div></body></html>
data/docs/index.html CHANGED
@@ -13,7 +13,7 @@
13
13
  <p><a href='http://maruku.rubyforge.org/'>Maruku</a> is a Markdown interpreter written in <a href='http://www.ruby-lang.org'>Ruby</a>.</p>
14
14
 
15
15
  <blockquote id='news'>
16
- <p><a href='#release_notes'>Last release</a> is version 0.5.1 &#8211; 2007-01-24.</p>
16
+ <p><a href='#release_notes'>Last release</a> is version 0.5.3 &#8211; 2007-02-05.</p>
17
17
 
18
18
  <p>Use this command to update:</p>
19
19
 
@@ -59,7 +59,7 @@
59
59
  <p><strong>The name of the game</strong>: Maruku is the <a href='http://en.wikipedia.org/wiki/Romaji'>romaji</a> transliteration of the <a href='http://en.wikipedia.org/wiki/Katakana'>katakana</a> transliteration of &#8220;Mark&#8221;, the first word in Markdown. I chose this name because Ruby is Japanese, and also the sillable &#8220;ru&#8221; appears in Maruku.</p>
60
60
  <hr />
61
61
  <p>Table of contents: (<strong>auto-generated by Maruku!</strong>)</p>
62
- <div class='maruku_toc'><ul style='list-style: none;'><li><span class='maruku_section_number'>1. </span><a href='#release_notes'>Release notes</a></li><li><span class='maruku_section_number'>2. </span><a href='#download'>Download</a><ul style='list-style: none;'><li><span class='maruku_section_number'>2.1. </span><a href='#bugs_report'>Bugs report</a></li></ul></li><li><span class='maruku_section_number'>3. </span><a href='#usage'>Usage</a><ul style='list-style: none;'><li><span class='maruku_section_number'>3.1. </span><a href='#embedded_maruku'>Embedded Maruku</a></li><li><span class='maruku_section_number'>3.2. </span><a href='#from_the_command_line'>From the command line</a></li></ul></li><li><span class='maruku_section_number'>4. </span><a href='#maruku-and-bluecloth'>Maruku and Bluecloth</a></li><li><span class='maruku_section_number'>5. </span><a href='#maruku_summary_of_features'>Maruku summary of features</a><ul style='list-style: none;'><li><span class='maruku_section_number'>5.1. </span><a href='#meta'>New meta-data syntax</a></li><li><span class='maruku_section_number'>5.2. </span><a href='#toc-generation'>Automatic generation of the table of contents</a></li><li><span class='maruku_section_number'>5.3. </span><a href='#entities'>Use HTML entities</a></li><li><span class='maruku_section_number'>5.4. </span><a href='#this_header_contains_emphasis_strong_text_and_'>This header contains <em>emphasis</em> <strong>strong text</strong> and <code>code</code></a></li></ul></li><li><span class='maruku_section_number'>6. </span><a href='#extra'>Examples of PHP Markdown Extra syntax</a></li></ul></div><hr />
62
+ <div class='maruku_toc'><ul style='list-style: none;'><li><span class='maruku_section_number'>1. </span><a href='#release_notes'>Release notes</a></li><li><span class='maruku_section_number'>2. </span><a href='#download'>Download</a><ul style='list-style: none;'><li><span class='maruku_section_number'>2.1. </span><a href='#bugs_report'>Bugs report</a></li></ul></li><li><span class='maruku_section_number'>3. </span><a href='#usage'>Usage</a><ul style='list-style: none;'><li><span class='maruku_section_number'>3.1. </span><a href='#embedded_maruku'>Embedded Maruku</a></li><li><span class='maruku_section_number'>3.2. </span><a href='#from_the_command_line'>From the command line</a></li></ul></li><li><span class='maruku_section_number'>4. </span><a href='#maruku-and-bluecloth'>Maruku and Bluecloth</a></li><li><span class='maruku_section_number'>5. </span><a href='#features'>Maruku summary of features</a><ul style='list-style: none;'><li><span class='maruku_section_number'>5.1. </span><a href='#meta'>New meta-data syntax</a></li><li><span class='maruku_section_number'>5.2. </span><a href='#toc-generation'>Automatic generation of the table of contents</a></li><li><span class='maruku_section_number'>5.3. </span><a href='#entities'>Use HTML entities</a></li><li><span class='maruku_section_number'>5.4. </span><a href='#this_header_contains_emphasis_strong_text_and_'>This header contains <em>emphasis</em> <strong>strong text</strong> and <code>code</code></a></li></ul></li><li><span class='maruku_section_number'>6. </span><a href='#extra'>Examples of PHP Markdown Extra syntax</a></li></ul></div><hr />
63
63
  <h2 id='release_notes'><span class='maruku_section_number'>1. </span>Release notes</h2>
64
64
 
65
65
  <p>Note: Maruku seems to be very robust, nevertheless it is still beta-level software. So if you want to use it in production environments, please check back in a month or so, while we squash the remaining bugs.</p>
@@ -139,7 +139,7 @@
139
139
 
140
140
  <p>Please note that Maruku has a lot more features and therefore is looking for much more patterns in the file.</p>
141
141
 
142
- <h2 id='maruku_summary_of_features'><span class='maruku_section_number'>5. </span>Maruku summary of features</h2>
142
+ <h2 id='features'><span class='maruku_section_number'>5. </span>Maruku summary of features</h2>
143
143
 
144
144
  <ul>
145
145
  <li>
@@ -323,4 +323,4 @@ I would love to have an equivalent in Ruby.
323
323
 
324
324
  --><div class='footnotes'><hr /><ol><li id='fn:1'>
325
325
  <p>I really was missing those.</p>
326
- <a href='#fnref:1' rev='footnote'>&#8617;</a></li></ol></div><div class='maruku_signature'><hr /><span style='font-size: small; font-style: italic'>Created by <a href='http://maruku.rubyforge.org' title='Maruku: a Markdown-superset interpreter for Ruby'>Maruku</a> at 13:51 on Wednesday, January 24th, 2007.</span></div></body></html>
326
+ <a href='#fnref:1' rev='footnote'>&#8617;</a></li></ol></div><div class='maruku_signature'><hr /><span style='font-size: small; font-style: italic'>Created by <a href='http://maruku.rubyforge.org' title='Maruku: a Markdown-superset interpreter for Ruby'>Maruku</a> at 15:30 on Monday, February 05th, 2007.</span></div></body></html>
@@ -776,4 +776,4 @@ _ underscore
776
776
  - minus sign (hyphen)
777
777
  . dot
778
778
  ! exclamation mark</code></pre>
779
- <div class='maruku_signature'><hr /><span style='font-size: small; font-style: italic'>Created by <a href='http://maruku.rubyforge.org' title='Maruku: a Markdown-superset interpreter for Ruby'>Maruku</a> at 13:49 on Wednesday, January 24th, 2007.</span></div></body></html>
779
+ <div class='maruku_signature'><hr /><span style='font-size: small; font-style: italic'>Created by <a href='http://maruku.rubyforge.org' title='Maruku: a Markdown-superset interpreter for Ruby'>Maruku</a> at 14:11 on Monday, February 05th, 2007.</span></div></body></html>
data/docs/maruku.html CHANGED
@@ -13,7 +13,7 @@
13
13
  <p><a href='http://maruku.rubyforge.org/'>Maruku</a> is a Markdown interpreter written in <a href='http://www.ruby-lang.org'>Ruby</a>.</p>
14
14
 
15
15
  <blockquote id='news'>
16
- <p><a href='#release_notes'>Last release</a> is version 0.5.1 &#8211; 2007-01-24.</p>
16
+ <p><a href='#release_notes'>Last release</a> is version 0.5.3 &#8211; 2007-02-05.</p>
17
17
 
18
18
  <p>Use this command to update:</p>
19
19
 
@@ -59,7 +59,7 @@
59
59
  <p><strong>The name of the game</strong>: Maruku is the <a href='http://en.wikipedia.org/wiki/Romaji'>romaji</a> transliteration of the <a href='http://en.wikipedia.org/wiki/Katakana'>katakana</a> transliteration of &#8220;Mark&#8221;, the first word in Markdown. I chose this name because Ruby is Japanese, and also the sillable &#8220;ru&#8221; appears in Maruku.</p>
60
60
  <hr />
61
61
  <p>Table of contents: (<strong>auto-generated by Maruku!</strong>)</p>
62
- <div class='maruku_toc'><ul style='list-style: none;'><li><span class='maruku_section_number'>1. </span><a href='#release_notes'>Release notes</a></li><li><span class='maruku_section_number'>2. </span><a href='#download'>Download</a><ul style='list-style: none;'><li><span class='maruku_section_number'>2.1. </span><a href='#bugs_report'>Bugs report</a></li></ul></li><li><span class='maruku_section_number'>3. </span><a href='#usage'>Usage</a><ul style='list-style: none;'><li><span class='maruku_section_number'>3.1. </span><a href='#embedded_maruku'>Embedded Maruku</a></li><li><span class='maruku_section_number'>3.2. </span><a href='#from_the_command_line'>From the command line</a></li></ul></li><li><span class='maruku_section_number'>4. </span><a href='#maruku-and-bluecloth'>Maruku and Bluecloth</a></li><li><span class='maruku_section_number'>5. </span><a href='#maruku_summary_of_features'>Maruku summary of features</a><ul style='list-style: none;'><li><span class='maruku_section_number'>5.1. </span><a href='#meta'>New meta-data syntax</a></li><li><span class='maruku_section_number'>5.2. </span><a href='#toc-generation'>Automatic generation of the table of contents</a></li><li><span class='maruku_section_number'>5.3. </span><a href='#entities'>Use HTML entities</a></li><li><span class='maruku_section_number'>5.4. </span><a href='#this_header_contains_emphasis_strong_text_and_'>This header contains <em>emphasis</em> <strong>strong text</strong> and <code>code</code></a></li></ul></li><li><span class='maruku_section_number'>6. </span><a href='#extra'>Examples of PHP Markdown Extra syntax</a></li></ul></div><hr />
62
+ <div class='maruku_toc'><ul style='list-style: none;'><li><span class='maruku_section_number'>1. </span><a href='#release_notes'>Release notes</a></li><li><span class='maruku_section_number'>2. </span><a href='#download'>Download</a><ul style='list-style: none;'><li><span class='maruku_section_number'>2.1. </span><a href='#bugs_report'>Bugs report</a></li></ul></li><li><span class='maruku_section_number'>3. </span><a href='#usage'>Usage</a><ul style='list-style: none;'><li><span class='maruku_section_number'>3.1. </span><a href='#embedded_maruku'>Embedded Maruku</a></li><li><span class='maruku_section_number'>3.2. </span><a href='#from_the_command_line'>From the command line</a></li></ul></li><li><span class='maruku_section_number'>4. </span><a href='#maruku-and-bluecloth'>Maruku and Bluecloth</a></li><li><span class='maruku_section_number'>5. </span><a href='#features'>Maruku summary of features</a><ul style='list-style: none;'><li><span class='maruku_section_number'>5.1. </span><a href='#meta'>New meta-data syntax</a></li><li><span class='maruku_section_number'>5.2. </span><a href='#toc-generation'>Automatic generation of the table of contents</a></li><li><span class='maruku_section_number'>5.3. </span><a href='#entities'>Use HTML entities</a></li><li><span class='maruku_section_number'>5.4. </span><a href='#this_header_contains_emphasis_strong_text_and_'>This header contains <em>emphasis</em> <strong>strong text</strong> and <code>code</code></a></li></ul></li><li><span class='maruku_section_number'>6. </span><a href='#extra'>Examples of PHP Markdown Extra syntax</a></li></ul></div><hr />
63
63
  <h2 id='release_notes'><span class='maruku_section_number'>1. </span>Release notes</h2>
64
64
 
65
65
  <p>Note: Maruku seems to be very robust, nevertheless it is still beta-level software. So if you want to use it in production environments, please check back in a month or so, while we squash the remaining bugs.</p>
@@ -139,7 +139,7 @@
139
139
 
140
140
  <p>Please note that Maruku has a lot more features and therefore is looking for much more patterns in the file.</p>
141
141
 
142
- <h2 id='maruku_summary_of_features'><span class='maruku_section_number'>5. </span>Maruku summary of features</h2>
142
+ <h2 id='features'><span class='maruku_section_number'>5. </span>Maruku summary of features</h2>
143
143
 
144
144
  <ul>
145
145
  <li>
@@ -323,4 +323,4 @@ I would love to have an equivalent in Ruby.
323
323
 
324
324
  --><div class='footnotes'><hr /><ol><li id='fn:1'>
325
325
  <p>I really was missing those.</p>
326
- <a href='#fnref:1' rev='footnote'>&#8617;</a></li></ol></div><div class='maruku_signature'><hr /><span style='font-size: small; font-style: italic'>Created by <a href='http://maruku.rubyforge.org' title='Maruku: a Markdown-superset interpreter for Ruby'>Maruku</a> at 13:51 on Wednesday, January 24th, 2007.</span></div></body></html>
326
+ <a href='#fnref:1' rev='footnote'>&#8617;</a></li></ol></div><div class='maruku_signature'><hr /><span style='font-size: small; font-style: italic'>Created by <a href='http://maruku.rubyforge.org' title='Maruku: a Markdown-superset interpreter for Ruby'>Maruku</a> at 15:30 on Monday, February 05th, 2007.</span></div></body></html>
data/docs/maruku.md CHANGED
@@ -3,23 +3,28 @@ Use numbered headers: true
3
3
  HTML use syntax: true
4
4
  LaTeX use listings: true
5
5
  LaTeX CJK: false
6
+ LaTeX preamble: preamble.tex
6
7
 
7
8
  ![MaRuKu](logo.png){#logo}
8
9
 
10
+
9
11
  Mar**u**k**u**: a Markdown-superset interpreter
10
12
  ===============================================
11
13
 
12
14
  [Maruku] is a Markdown interpreter written in [Ruby].
13
15
 
14
- > [Last release](#release_notes) is version 0.5.1 -- 2007-01-24.
16
+ > [Last release](#release_notes) is version 0.5.3 -- 2007-02-05.
15
17
  >
16
18
  > Use this command to update:
17
19
  >
18
20
  > $ gem update maruku
19
21
  {#news}
20
22
 
23
+
24
+
21
25
  * * *
22
26
 
27
+
23
28
  Maruku allows you to write in an easy-to-read-and-write syntax, like this:
24
29
 
25
30
  > [This document in Markdown][this_md]
@@ -206,7 +211,7 @@ looking for much more patterns in the file.
206
211
 
207
212
 
208
213
 
209
- Maruku summary of features
214
+ Maruku summary of features {#features}
210
215
  --------------------------
211
216
 
212
217
  * Supported syntax
data/docs/proposal.html CHANGED
@@ -343,4 +343,4 @@ for me
343
343
 
344
344
 
345
345
  for me </code></pre>
346
- <div class='maruku_signature'><hr /><span style='font-size: small; font-style: italic'>Created by <a href='http://maruku.rubyforge.org' title='Maruku: a Markdown-superset interpreter for Ruby'>Maruku</a> at 13:49 on Wednesday, January 24th, 2007.</span></div></body></html>
346
+ <div class='maruku_signature'><hr /><span style='font-size: small; font-style: italic'>Created by <a href='http://maruku.rubyforge.org' title='Maruku: a Markdown-superset interpreter for Ruby'>Maruku</a> at 14:11 on Monday, February 05th, 2007.</span></div></body></html>
data/docs/tmp.md ADDED
@@ -0,0 +1,2 @@
1
+ &alpha; &alpha;, &alpha;&beta; . &beta;.
2
+ &alpha; &alpha;, &alpha;&beta; . &beta;.
@@ -206,10 +206,13 @@ module MaRuKu; module In; module Markdown; module SpanLevelParser
206
206
  elsif after.kind_of? MDElement
207
207
  after.al = e.ial
208
208
  else
209
- maruku_error "I don't know who you are referring to:"+
210
- " {#{e.ial.to_md}}", src, con
209
+ maruku_error "It is not clear to me what element this IAL {:#{e.ial.to_md}} \n"+
210
+ "is referring to. The element before is a #{before.class.to_s}, \n"+
211
+ "the element after is a #{after.class.to_s}.\n"+
212
+ "\n before: #{before.inspect}"+
213
+ "\n after: #{after.inspect}",
214
+ src, con
211
215
  # xxx dire se c'è empty vicino
212
- maruku_recover "Ignoring IAL: {#{e.ial.to_md}}", src, con
213
216
  end
214
217
  end
215
218
  end
@@ -102,7 +102,7 @@ module MaRuKu; module In; module Markdown; module BlockLevelParser
102
102
  when :raw_html; e = read_raw_html(src); output << e if e
103
103
 
104
104
  when :footnote_text; output.push read_footnote_text(src)
105
- when :ref_definition; output.push read_ref_definition(src)
105
+ when :ref_definition; read_ref_definition(src, output)
106
106
  when :abbreviation; output.push read_abbreviation(src)
107
107
  when :xml_instr; read_xml_instruction(src, output)
108
108
  when :metadata;
@@ -452,7 +452,7 @@ module MaRuKu; module In; module Markdown; module BlockLevelParser
452
452
  end
453
453
 
454
454
 
455
- def read_ref_definition(src)
455
+ def read_ref_definition(src, out)
456
456
  line = src.shift_line
457
457
 
458
458
  # if link is incomplete, shift next line
@@ -465,7 +465,8 @@ module MaRuKu; module In; module Markdown; module BlockLevelParser
465
465
 
466
466
  match = LinkRegex.match(line)
467
467
  if not match
468
- error "Link does not respect format: '#{line}'"
468
+ maruku_error "Link does not respect format: '#{line}'"
469
+ return
469
470
  end
470
471
 
471
472
  id = match[1]; url = match[2]; title = match[3];
@@ -487,7 +488,7 @@ module MaRuKu; module In; module Markdown; module BlockLevelParser
487
488
  end
488
489
  # puts hash.inspect
489
490
 
490
- return md_ref_def(id, url, meta={:title=>title})
491
+ out.push md_ref_def(id, url, meta={:title=>title})
491
492
  end
492
493
 
493
494
  def read_table(src)
@@ -278,7 +278,7 @@ module MaRuKu; module In; module Markdown; module SpanLevelParser
278
278
  end
279
279
 
280
280
  def extension_meta(src, con, break_on_chars)
281
- if m = src.read_regexp(/([^:]+):/)
281
+ if m = src.read_regexp(/([^\s\:]+):/)
282
282
  name = m[1]
283
283
  al = read_attribute_list(src, con, break_on_chars)
284
284
  # puts "#{name}=#{al.inspect}"
@@ -110,7 +110,7 @@ module MaRuKu; module Strings
110
110
  # This regex is taken from BlueCloth sources
111
111
  # Link defs are in the form: ^[id]: \n? url "optional title"
112
112
  LinkRegex = %r{
113
- ^[ ]*\[([^\]]+)\]: # id = $1
113
+ ^[ ]{0,3}\[([^\[\]]+)\]: # id = $1
114
114
  [ ]*
115
115
  <?(\S+)>? # url = $2
116
116
  [ ]*
@@ -122,7 +122,7 @@ module MaRuKu; module Strings
122
122
  )? # title is optional
123
123
  }x
124
124
 
125
- IncompleteLink = %r{^\s*\[(.+)\]:\s*$}
125
+ IncompleteLink = %r{^[ ]{0,3}\[([^\[\]]+)\]:\s*$}
126
126
 
127
127
  HeaderWithId = /^(.*)\{\#([\w_-]+)\}\s*$/
128
128