All Downloads are FREE. Search and download functionalities are using the official Maven repository.

izumi.sbtgen.impl.WithBasicRenderers.scala Maven / Gradle / Ivy

The newest version!
package izumi.sbtgen.impl

import izumi.sbtgen.model.ArtifactId

trait WithBasicRenderers {
  protected def renderName(s: String): String = '`' + s + '`'

  protected def renderName(s: ArtifactId): String = renderName(s.value)

  def stringLit(s: String): String = {
    if (s.contains("\"")) {
      val q = "\""*3
      q + s + q
    } else {
      '"' + s + '"'
    }
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy