Maruku "Email" Header Detection

The Regexp, used in Maruku to detect "email"
headers (used, e.g., for S5 slideshow metadata)
could, for some inputs, interact badly with
Instiki's Chunk Handler.
Fixed.
This commit is contained in:
Jacques Distler 2009-07-13 23:59:09 -05:00
parent 51280b758d
commit 698daecf0e

View file

@ -46,7 +46,7 @@ module MaRuKu; module Strings
# #
def parse_email_headers(s) def parse_email_headers(s)
keys={} keys={}
match = (s =~ /\A((\w[\w\s\_\-]+: .*\n)+)\s*\n/) match = (s =~ /\A((\w[\w \t\_\-]+: .*?\n)+)\s*?\n/)
if match != 0 if match != 0
keys[:data] = s keys[:data] = s
else else