Browse files

Refactoring comment_pattern to single line

  • Loading branch information...
1 parent 29a55d0 commit 7aa2ea60b314e06e4fc1f364c76dcdc037b120fd Kurtis Rainbolt-Greene committed Jan 9, 2012
Showing with 1 addition and 2 deletions.
  1. +1 −2 lib/rocco.rb
@@ -116,8 +116,7 @@ def initialize(filename, sources=[], options={})
# Turn `:comment_chars` into a regex matching a series of spaces, the
# `:comment_chars` string, and the an optional space. We'll use that
# to detect single-line comments.
- @comment_pattern =
+ @comment_pattern ="^\\s*#{@options[:comment_chars][:single]}\s?")
# `parse()` the file contents stored in `@data`. Run the result through
# `split()` and that result through `highlight()` to generate the final

0 comments on commit 7aa2ea6

Please sign in to comment.