StyledSpan
classin packageklyn.code.highlighters
public class StyledSpan extends Object
└ StyledSpan

Styled text fragment produced by syntax highlighters.

Associates a slice of source text with a UI-agnostic SyntaxStyle.

Example
import klyn.code.highlighters

span = StyledSpan("return", AnsiSyntax.keyword("return").style)
assert span.text == "return"
Properties
Modifier and Type Member Description
public readonly property style
style as SyntaxStyle
Visual style associated with this span.
public readonly property text
text as String
Source text covered by this span.
Inherited Properties
propertyInherited Properties from Object: type
Constructors
Modifier and Type Member Description
public StyledSpan
StyledSpan(text as String, style as SyntaxStyle = null)
Creates a styled text span.
Inherited Methods
methodInherited Methods from Object: deepCopy, fromJson, hash, toDict, toJson, toMap, toString, toXml