Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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

  • Loading branch information...
commit 441568790bcd8442ac1686197721ccc0a3d8f3ce 1 parent aa2e100
Kyle Neath authored
Showing with 4 additions and 0 deletions.
  1. +4 −0 lib/kss/comment_parser.rb
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|
Please sign in to comment.
Something went wrong with that request. Please try again.