Non-ASCII Lists
Fix a bug in Maruku's list-parsing. Also fix a test broken by latest Rack + Ruby 1.9.
This commit is contained in:
parent
7e5dbe5854
commit
c9ad2c0c6e
4 changed files with 19 additions and 5 deletions
|
@ -204,8 +204,8 @@ Disabled by default because of security concerns.
|
|||
|
||||
# Select all text elements of e
|
||||
XPath.match(e, "//text()" ).each { |original_text|
|
||||
s = original_text.value.strip
|
||||
if s.size > 0
|
||||
s = original_text.value
|
||||
if s.strip.size > 0
|
||||
|
||||
# puts "Parsing #{s.inspect} as blocks: #{parse_blocks} (#{e.name}, #{e.attributes['markdown']}) "
|
||||
|
||||
|
|
|
@ -53,8 +53,8 @@ module MaRuKu; module Strings
|
|||
# Something is wrong with how we parse lists! :-(
|
||||
#return :ulist if l =~ /^[ ]{0,3}([\*\-\+])\s+.*\w+/
|
||||
#return :olist if l =~ /^[ ]{0,3}\d+\..*\w+/
|
||||
return :ulist if l =~ /^[ ]{0,1}([\*\-\+])\s+.*\w+/
|
||||
return :olist if l =~ /^[ ]{0,1}\d+\..*\w+/
|
||||
return :ulist if l =~ /^[ ]{0,1}([\*\-\+])\s+.*/
|
||||
return :olist if l =~ /^[ ]{0,1}\d+\..*/
|
||||
return :header1 if l =~ /^(=)+/
|
||||
return :header2 if l =~ /^([-\s])+$/
|
||||
return :header3 if l =~ /^(#)+\s*\S+/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue