File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -39,9 +39,6 @@ def remove_annotations(_options={})
39
39
existing_text = File . read ( routes_file )
40
40
content , header_position = strip_annotations ( existing_text )
41
41
new_content = strip_on_removal ( content , header_position )
42
-
43
- # Make sure we end on a trailing newline.
44
- new_content << '' unless new_content . last == ''
45
42
new_text = new_content . join ( "\n " )
46
43
47
44
if rewrite_contents ( existing_text , new_text )
@@ -150,6 +147,9 @@ def strip_on_removal(content, header_position)
150
147
content . pop while content . last == ''
151
148
end
152
149
150
+ # Make sure we end on a trailing newline.
151
+ content << '' unless content . last == ''
152
+
153
153
# TODO: If the user buried it in the middle, we should probably see about
154
154
# TODO: preserving a single line of space between the content above and
155
155
# TODO: below...
You can’t perform that action at this time.
0 commit comments