Skip to content

armgit / solr

Public Imported from GitHub
0

Apache Solr open-source search software

Try again to fix precommit on Windows with native line endings

Steve Rowe1a3295fb0077
diff --git a/build.xml b/build.xml
old mode 100644
new mode 100755
index 1176dc7dbad..79326e97d17
--- a/build.xml
+++ b/build.xml
@@ -208,17 +208,16 @@
def lineNumber = 0;
singleLineSplitter.split(text).each {
++lineNumber;
- it.trim(); // remove trailing carriage return after split on Windows with native line endings
if (underSourceHeader) { // This line is either a single source line, or the boundary of a code block
inCodeBlock = blockBoundaryPattern.matcher(it).matches();
- if ( ! blockTitlePattern.matcher(it).matches()) { // Keep underSourceHeader=true
+ if ( ! blockTitlePattern.matcher(it).matches()) {
underSourceHeader = false;
}
} else {
if (inCodeBlock) {
inCodeBlock = ! blockBoundaryPattern.matcher(it).matches();
} else {
- underSourceHeader = sourceHeaderPattern.matcher(it).matches();
+ underSourceHeader = sourceHeaderPattern.matcher(it).lookingAt();
if ( ! underSourceHeader) {
def unescapedSymbolMatcher = unescapedSymbolPattern.matcher(it);
if (unescapedSymbolMatcher.find()) {