Commit 40acc884 by Dustin Sallings

When position is set to "after", include a newline before the schema.

parent cab8eee8
...@@ -62,7 +62,7 @@ module AnnotateModels ...@@ -62,7 +62,7 @@ module AnnotateModels
content.sub!(/^# #{PREFIX}.*?\n(#.*\n)*\n/, '') content.sub!(/^# #{PREFIX}.*?\n(#.*\n)*\n/, '')
# Write it back # Write it back
new_content = options[:position] == "after" ? (content + info_block) : (info_block + content) new_content = options[:position] == "after" ? (content + "\n" + info_block) : (info_block + content)
File.open(file_name, "w") { |f| f.puts new_content } File.open(file_name, "w") { |f| f.puts new_content }
end end
end end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment