lib/shears.rb in flannel-0.0.1 vs lib/shears.rb in flannel-0.1.0
- old
+ new
@@ -49,29 +49,31 @@
end
line
end
def strip_markers line
- parts = line.match(/^([=_*]+)(.*)/)
+ parts = line.match(/^([=_*&]+)(.*)/)
if parts
set_style parts[1]
line = parts[2]
end
line
end
def set_style marker
- if marker
+ if marker
case marker[0]
when 61 # equals (header)
style = "header_#{marker.length}"
@square.style = style.to_sym
when 95 # underscore (preformatted)
@square.style = :preformatted
@preformatted_marker_line = true
when 42 # star (list)
@square.style = :list
+ when 38 # ampersand (feed)
+ @square.style = :feed
end
end
end
def empty? str