comments are considered doc only when # is followed by space

This lets you force comments over to the code side by using any
character other than ' ' after the '#' character.
This commit is contained in:
Ryan Tomayko 2010-03-16 08:24:18 -07:00
parent 02dc9c6c4c
commit b6ece339b9

View File

@ -104,7 +104,7 @@ class Rocco
docs, code = [], [] docs, code = [], []
data.split("\n").each do |line| data.split("\n").each do |line|
case line case line
when /^\s*#(?!\!)/ when /^\s*#(?:\s+|$)/
if code.any? if code.any?
sections << [docs, code] sections << [docs, code]
docs, code = [], [] docs, code = [], []