Snippet

org.specs2.execute.Snippet$
See theSnippet companion class
object Snippet

Attributes

Companion
class
Graph
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
Snippet.type

Members list

Type members

Inherited types

type MirroredElemLabels <: Tuple

The names of the product elements

The names of the product elements

Attributes

Inherited from:
Mirror
type MirroredLabel <: String

The name of the type

The name of the type

Attributes

Inherited from:
Mirror

Value members

Concrete methods

def defaultMultilineMarkdownQuotes: String => String
def defaultSingleLineQuotes: String => String
def emptyPrompt: String => String
def githubMultilineMarkdownQuotes: String => String
def greaterThanPrompt: String => String
def markdownCode(multilineQuotes: String => String, singleLineQuotes: String => String, offset: Int): (String, String) => String

display a cut piece of code as markdown depending on the existence of newlines in the original piece

display a cut piece of code as markdown depending on the existence of newlines in the original piece

Attributes

def simplePrompt(p: String): String => String
def trimApproximatedSnippet: String => String

trim the expression from start and end accolades if it is a multiline expression

trim the expression from start and end accolades if it is a multiline expression

  • in some case it is necessary to add a dummy expression so that the range position of the captured snippet is correct. //;1// is the smallest such expression

Attributes

def trimRangePosSnippet: String => String

RangePos snippets are built by using all the string at the macro application point (it used to be only the "inside" code but that got broken in 2.11.0-M8)

RangePos snippets are built by using all the string at the macro application point (it used to be only the "inside" code but that got broken in 2.11.0-M8)

3 things need to be trimmed:

  • the "snippet" method call

  • the expression from start and end accolades if it is a multiline expression

  • in some case it is necessary to add a dummy expression so that the range position of the captured snippet is correct. //;1// is the smallest such expression

Attributes

Concrete fields

lazy val ls: String
lazy val parameters: String
lazy val scissorsMarker: String
lazy val scissorsMarkerFormat: String