Skip to content

Commit

Permalink
Merge pull request #41 from codeclimate/jp/content-formatting
Browse files Browse the repository at this point in the history
Improve content formatting
  • Loading branch information
jpignata committed Dec 14, 2015
2 parents 590c2b3 + 817e702 commit 038705e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/tasks/docs.rake
Original file line number Diff line number Diff line change
@@ -14,8 +14,10 @@ namespace :docs do
class_doc = content.match(/(\s+#.*)+/).to_s
doc_lines = class_doc.
gsub(/^\n/,"").
gsub("@example", "### Example:").
split("\n").
map { |line| line.gsub(/\s+#\s?/, "") }.
map { |line| line.gsub(/\A\s+#\s?/, "") }.
map { |line| line.gsub(/\A\s{2}/, " " * 4) }.
join("\n")
hash[file] = doc_lines
end

0 comments on commit 038705e

Please sign in to comment.