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:
parent
02dc9c6c4c
commit
b6ece339b9
@ -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 = [], []
|
||||||
|
Loading…
Reference in New Issue
Block a user