Skip to content

Commit f3d9ad5

Browse files
committed
Merge pull request #237 from syreclabs/develop
Do not add excessive blank lines when source has Windows EOLs
2 parents 612b7f5 + 5f27094 commit f3d9ad5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/annotate/annotate_models.rb

100755100644
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ module AnnotateModels
77
PREFIX = "== Schema Information"
88
PREFIX_MD = "## Schema Information"
99
END_MARK = "== Schema Information End"
10-
PATTERN = /^\n?# (?:#{COMPAT_PREFIX}|#{COMPAT_PREFIX_MD}).*?\n(#.*\n)*\n*/
10+
PATTERN = /^\r?\n?# (?:#{COMPAT_PREFIX}|#{COMPAT_PREFIX_MD}).*?\r?\n(#.*\r?\n)*(\r?\n)*/
1111

1212
# File.join for windows reverse bar compat?
1313
# I dont use windows, can`t test

0 commit comments

Comments
 (0)