From 6f18c90a504f9aca97a3cc41f1b01dc11373dde5 Mon Sep 17 00:00:00 2001 From: Jacques Distler Date: Mon, 22 Aug 2011 10:20:17 -0500 Subject: [PATCH] Ack! 2 more Maruku Errors 1. #to_html_code was not working (my own #$%* fault, for trying to be too fancy). 2. Empty list items. Reported by Andrew Stacey --- vendor/plugins/maruku/lib/maruku/input/parse_block.rb | 4 ++-- vendor/plugins/maruku/lib/maruku/output/to_html.rb | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/vendor/plugins/maruku/lib/maruku/input/parse_block.rb b/vendor/plugins/maruku/lib/maruku/input/parse_block.rb index 88ebf573..3a7151c1 100644 --- a/vendor/plugins/maruku/lib/maruku/input/parse_block.rb +++ b/vendor/plugins/maruku/lib/maruku/input/parse_block.rb @@ -122,7 +122,7 @@ module MaRuKu; module In; module Markdown; module BlockLevelParser if c.children.all? {|li| !li.want_my_paragraph} then c.children.each do |d| d.node_type = :li_span - d.children = d.children[0].children + d.children = d.children[0].children if d.children[0] end end end @@ -130,7 +130,7 @@ module MaRuKu; module In; module Markdown; module BlockLevelParser if c.children.all?{|defi| !defi.want_my_paragraph} then c.children.each do |definition| definition.definitions.each do |dd| - dd.children = dd.children[0].children + dd.children = dd.children[0].children if dd.children[0] end end end diff --git a/vendor/plugins/maruku/lib/maruku/output/to_html.rb b/vendor/plugins/maruku/lib/maruku/output/to_html.rb index 0fd752a9..919d0271 100644 --- a/vendor/plugins/maruku/lib/maruku/output/to_html.rb +++ b/vendor/plugins/maruku/lib/maruku/output/to_html.rb @@ -637,7 +637,9 @@ of the form `#ff00ff`. code['lang'] = lang code['class'] = lang end - pre << (code << text) + code << text + pre << code + pre end def to_html_inline_code;