public class StyledSpan extends Object
Styled text fragment produced by syntax highlighters.
Associates a slice of source text with a UI-agnostic SyntaxStyle.
import klyn.code.highlighters
span = StyledSpan("return", AnsiSyntax.keyword("return").style)
assert span.text == "return"| Modifier and Type | Member | Description |
|---|---|---|
| public readonly property | stylestyle as SyntaxStyle |
Visual style associated with this span. |
| public readonly property | texttext as String |
Source text covered by this span. |
| Modifier and Type | Member | Description |
|---|---|---|
| public | StyledSpanStyledSpan(text as String, style as SyntaxStyle = null) |
Creates a styled text span. |