maruku 0.2.12 → 0.2.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -54,7 +54,11 @@ class Maruku
54
54
  # REXML Bug? if indent!=-1 whitespace is not respected for 'pre' elements
55
55
  # containing code.
56
56
  doc.write(xml,indent=-1,transitive=false,ie_hack=true);
57
- xhtml10strict = "<?xml version='1.0'?>
57
+
58
+ encoding = ( (enc=@meta[:encoding]) ?
59
+ "encoding='#{enc}'" : "")
60
+
61
+ xhtml10strict = "<?xml version='1.0' #{encoding}?>
58
62
  <!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Strict//EN'
59
63
  'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'>\n"
60
64
  xhtml10strict + xml
@@ -407,19 +411,21 @@ class MDElement
407
411
  end
408
412
 
409
413
  def to_html_raw_html
414
+ raw_html = @meta[:raw_html]
410
415
  if rexml_doc = @meta[:parsed_html]
411
416
  root = rexml_doc.root
412
417
  if root.nil?
413
- s = "Bug in REXML: root() of Document is nil: \n#{rexml_doc.inspect}"
414
- $stderr.puts s
418
+ s = "Bug in REXML: root() of Document is nil: \n#{rexml_doc.inspect}\n"+
419
+ "Raw HTML:\n#{raw_html.inspect}"
420
+ # $stderr.puts s
415
421
  div = Element.new 'div'
416
- div << Text.new(s)
422
+ # div << Text.new(s)
417
423
  return div
424
+
418
425
  end
419
426
 
420
427
  return root
421
428
  else # invalid
422
- raw_html = @meta[:raw_html]
423
429
  # Creates red box with offending HTML
424
430
  $stderr.puts "Malformed HTML: #{raw_html}"
425
431
  pre = Element.new('pre')
@@ -17,7 +17,7 @@
17
17
  # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
18
18
 
19
19
  class Maruku
20
- Version = '0.2.12'
20
+ Version = '0.2.13'
21
21
 
22
22
  MarukuURL = 'http://maruku.rubyforge.org/'
23
23
  end
@@ -0,0 +1,10 @@
1
+
2
+ <!-- multi m
3
+
4
+ multi
5
+ meiowm
6
+
7
+ domiemoi me -->
8
+
9
+ dwpoko
10
+
@@ -0,0 +1,4 @@
1
+
2
+
3
+ What do you see here? `\\` it should be two backslashes.
4
+
@@ -6,8 +6,15 @@ Result: <em>Emphasis</em>
6
6
 
7
7
  Input:
8
8
  <img src="http://jigsaw.w3.org/css-validator/images/vcss"/>
9
- Result: <img src="http://jigsaw.w3.org/css-validator/images/vcss"/>
9
+ Result on span: <img src="http://jigsaw.w3.org/css-validator/images/vcss"/>
10
10
 
11
+ Result alone:
12
+
13
+ <img src="http://jigsaw.w3.org/css-validator/images/vcss"/>
14
+
15
+ Without closing:
16
+
17
+ <img src="http://jigsaw.w3.org/css-validator/images/vcss">
11
18
 
12
19
  <div markdown="1">
13
20
  This is *true* markdown text (paragraph)
metadata CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.9.0
3
3
  specification_version: 1
4
4
  name: maruku
5
5
  version: !ruby/object:Gem::Version
6
- version: 0.2.12
7
- date: 2006-12-28 00:00:00 +01:00
6
+ version: 0.2.13
7
+ date: 2006-12-29 00:00:00 +01:00
8
8
  summary: A Markdown interpreter in Ruby
9
9
  require_paths:
10
10
  - lib
@@ -30,6 +30,8 @@ authors:
30
30
  - Andrea Censi
31
31
  files:
32
32
  - lib/maruku.rb
33
+ - lib/maruku/html_helper.rb
34
+ - lib/maruku/maruku.rb
33
35
  - lib/maruku/parse_block.rb
34
36
  - lib/maruku/parse_doc.rb
35
37
  - lib/maruku/parse_span.rb
@@ -42,10 +44,21 @@ files:
42
44
  - lib/maruku/to_s.rb
43
45
  - lib/maruku/toc.rb
44
46
  - lib/maruku/version.rb
47
+ - lib/maruku/tests/benchmark.rb
48
+ - lib/maruku/tests/tests.rb
49
+ - docs/markdown_extra2.md
45
50
  - docs/markdown_syntax.md
46
51
  - docs/maruku.md
52
+ - docs/proposal.md
47
53
  - docs/todo.md
54
+ - docs/index.html
55
+ - docs/markdown_extra2.html
56
+ - docs/markdown_syntax.html
57
+ - docs/maruku.html
58
+ - docs/proposal.html
59
+ - tests/a.md
48
60
  - tests/bugs/code_in_links.md
61
+ - tests/bugs/complex_escaping.md
49
62
  - tests/others/abbreviations.md
50
63
  - tests/others/blank.md
51
64
  - tests/others/code.md