mirror of https://github.com/sbt/sbt.git
Add ; instead of brackets to xml group
This commit is contained in:
parent
ef74db7319
commit
8c0e400c11
|
|
@ -200,9 +200,7 @@ private[sbt] object XmlContent {
|
|||
|
||||
private val DOUBLE_SLASH = "//"
|
||||
|
||||
private val OPEN_BRACKET = s" $OPEN_CURLY_BRACKET "
|
||||
|
||||
private val CLOSE_BRACKET = " ) "
|
||||
private val CLOSE_XML_STATEMENT = ";"
|
||||
|
||||
/**
|
||||
*
|
||||
|
|
@ -356,7 +354,7 @@ private[sbt] object XmlContent {
|
|||
val (correctedStmt, shouldAddCloseBrackets, wasXml, _) = addBracketsIfNecessary(statements)
|
||||
val closeIfNecessaryCorrectedStmt =
|
||||
if (shouldAddCloseBrackets && wasXml) {
|
||||
correctedStmt.head +: CLOSE_BRACKET +: correctedStmt.tail
|
||||
correctedStmt.head +: CLOSE_XML_STATEMENT +: correctedStmt.tail
|
||||
} else {
|
||||
correctedStmt
|
||||
}
|
||||
|
|
@ -372,7 +370,7 @@ private[sbt] object XmlContent {
|
|||
val (newShouldAddCloseBracket, newStmtAcc) = if (isXml) {
|
||||
addOpenBracketIfNecessary(accStmt, shouldAddCloseBracket, prvWasXml, prvStmt)
|
||||
} else if (shouldAddCloseBracket) {
|
||||
(false, CLOSE_BRACKET +: accStmt)
|
||||
(false, CLOSE_XML_STATEMENT +: accStmt)
|
||||
} else {
|
||||
(false, accStmt)
|
||||
}
|
||||
|
|
@ -386,11 +384,7 @@ private[sbt] object XmlContent {
|
|||
if (prvWasXml) {
|
||||
(shouldAddCloseBracket, stmtAcc)
|
||||
} else {
|
||||
if (areBracketsNecessary(prvStatement)) {
|
||||
(true, OPEN_BRACKET +: stmtAcc)
|
||||
} else {
|
||||
(false, stmtAcc)
|
||||
}
|
||||
(areBracketsNecessary(prvStatement), stmtAcc)
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -0,0 +1,16 @@
|
|||
import sbt._
|
||||
|
||||
val scmpom = taskKey[xml.NodeBuffer]("Node buffer")
|
||||
|
||||
scmpom := <scm>
|
||||
<url>git@github.com:mohiva/play-html-compressor.git</url>
|
||||
<connection>scm:git:git@github.com:mohiva/play-html-compressor.git</connection>
|
||||
</scm>
|
||||
<developers>
|
||||
<developer>
|
||||
<id>akkie</id>
|
||||
<name>Christian Kaps</name>
|
||||
<url>http://mohiva.com</url>
|
||||
</developer>
|
||||
</developers>
|
||||
<a></a>
|
||||
|
|
@ -0,0 +1 @@
|
|||
scmpom := <a/><b a="rt">OK</b>
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
import sbt._
|
||||
|
||||
val scmpom = taskKey[xml.NodeBuffer]("Node buffer")
|
||||
|
||||
scmpom := <a/><b a="rt">OK</b>;
|
||||
|
|
@ -1,17 +0,0 @@
|
|||
k1 := {}
|
||||
|
||||
k2 := {}
|
||||
|
||||
k3 := {
|
||||
|
||||
|
||||
val x = "hi"
|
||||
()
|
||||
}
|
||||
|
||||
k4 := { }; k5 := ()
|
||||
|
||||
k1 <<= k1 map {_ => sys.error("k1")}
|
||||
|
||||
k4 := { val x = k4.value; () }
|
||||
|
||||
|
|
@ -1 +0,0 @@
|
|||
k4 := ()
|
||||
|
|
@ -1,15 +0,0 @@
|
|||
k1 := {}
|
||||
|
||||
k2 := {}
|
||||
|
||||
k3 := {
|
||||
|
||||
|
||||
val x = "hi"
|
||||
()
|
||||
}
|
||||
|
||||
k4 := (); k5 := ()
|
||||
|
||||
k1 <<= k1 map {_ => sys.error("k1")}
|
||||
|
||||
|
|
@ -2,4 +2,4 @@ import sbt._
|
|||
|
||||
val scmpom = taskKey[xml.NodeBuffer]("Node buffer")
|
||||
|
||||
scmpom := ( <a/><b a="rt">OK</b> )
|
||||
scmpom := <a/><b a="rt">OK</b>;
|
||||
Loading…
Reference in New Issue