lib/brief/repository.rb in brief-1.9.12 vs lib/brief/repository.rb in brief-1.9.13
- old
+ new
@@ -63,9 +63,12 @@
end
InvalidPath = Class.new(Exception)
def normalize_path(p)
+ p = p.to_s
+ p = p + '.md' unless p.match(/\.\w+$/)
+
docs_path.join(p).tap do |normalized|
if normalized.to_s.split("/").length < docs_path.realpath.to_s.split("/").length
raise InvalidPath
end
end