Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ANSIHTML = template.Must(template.New("ansi").Parse(`{{- range . -}}
<span class="ansi-line">
{{- range . -}}
{{- if or .Style.Foreground .Style.Background .Style.Modifier -}}
<span class="{{with .Style.Foreground}}fg-{{.}}{{end}}{{with .Style.Background}} bg-{{.}}{{end}}">
{{- printf "%s" .Data -}}
</span>
{{- else -}}
{{- printf "%s" .Data -}}
{{- end -}}
{{- end -}}
</span>
{{end}}`))
TODO: support modifiers (bold/etc) - it's a bit tricky, may need changes upstream
Functions ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.