lib/flannel/text_block.rb in flannel-0.2.5 vs lib/flannel/text_block.rb in flannel-0.2.6
- old
+ new
@@ -30,9 +30,16 @@
match = text.match /^(=+)/
weight = match.captures[0].length
@style = "header_#{weight}".to_sym
@text = text[weight..-1]
+ when ':'[0] #generic
+ match = text.match /^(:[a-z_]+)/
+
+ @style = match.captures[0][1..-1].to_sym
+
+ style_length = match.captures[0].length
+ @text = text[style_length..-1].strip
else #other
@style = :paragraph
@text = text
end
end
\ No newline at end of file