Browse files

Ensure block-style with preceding * on every line gets stripped

  • Loading branch information...
1 parent aa2e100 commit 441568790bcd8442ac1686197721ccc0a3d8f3ce @kneath committed Feb 6, 2012
Showing with 4 additions and 0 deletions.
  1. +4 −0 lib/kss/comment_parser.rb
View
4 lib/kss/comment_parser.rb
@@ -116,6 +116,10 @@ def parse_blocks
def normalize(text_block)
return text_block if @options[:preserve_whitespace]
+ # Strip out any preceding [whitespace]* that occur on every line. Not
+ # the smartest, but I wonder if I care.
+ text_block = text_block.gsub(/^(\s*\*+)/, '')
+
# Strip consistent indenting by measuring first line's whitespace
indent_size = nil
unindented = text_block.split("\n").collect do |line|

0 comments on commit 4415687

Please sign in to comment.