Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 1ce86e1fd5
Fetching contributors…

Cannot retrieve contributors at this time

14 lines (10 sloc) 0.429 kb
import sbt._
import scala.xml._
import scala.xml.transform._
object Rewrite extends Plugin {
def rewriter(f: PartialFunction[xml.Node, NodeSeq]): RuleTransformer = new RuleTransformer(rule(f))
def rule(f: PartialFunction[xml.Node, NodeSeq]): RewriteRule = new RewriteRule {
override def transform(n: xml.Node) = if (f.isDefinedAt(n)) f(n) else n
Jump to Line
Something went wrong with that request. Please try again.