Skip to content

Commit

Permalink
Refactoring comment_pattern to single line
Browse files Browse the repository at this point in the history
  • Loading branch information
Kurtis Rainbolt-Greene committed Jan 9, 2012
1 parent 29a55d0 commit 7aa2ea6
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/rocco.rb
Expand Up @@ -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 =
Regexp.new("^\\s*#{@options[:comment_chars][:single]}\s?")
@comment_pattern = Regexp.new("^\\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
Expand Down

0 comments on commit 7aa2ea6

Please sign in to comment.