@@ -46,14 +46,14 @@ object Utility extends AnyRef with parsing.TokenTests {
4646 */
4747 def trim (x : Node ): Node = x match {
4848 case Elem (pre, lab, md, scp, child@_* ) =>
49- val children = combineAdjacentTextNodes(child:_* ) flatMap trimProper
49+ val children = combineAdjacentTextNodes(child) flatMap trimProper
5050 Elem (pre, lab, md, scp, children.isEmpty, children : _* )
5151 }
5252
53- private def combineAdjacentTextNodes (children : Node * ): Seq [Node ] = {
53+ private def combineAdjacentTextNodes (children : Seq [ Node ] ): Seq [Node ] = {
5454 children.foldRight(Seq .empty[Node ]) {
55- case (Text (left), Text (right) +: accMinusLast ) => Text (left + right) +: accMinusLast
56- case (n, acc ) => n +: acc
55+ case (Text (left), Text (right) +: nodes ) => Text (left + right) +: nodes
56+ case (n, nodes ) => n +: nodes
5757 }
5858 }
5959
@@ -63,7 +63,7 @@ object Utility extends AnyRef with parsing.TokenTests {
6363 */
6464 def trimProper (x : Node ): Seq [Node ] = x match {
6565 case Elem (pre, lab, md, scp, child@_* ) =>
66- val children = combineAdjacentTextNodes(child:_* ) flatMap trimProper
66+ val children = combineAdjacentTextNodes(child) flatMap trimProper
6767 Elem (pre, lab, md, scp, children.isEmpty, children : _* )
6868 case Text (s) =>
6969 new TextBuffer ().append(s).toText
0 commit comments