Registry / utility / sourcegraph-syntaxhighlight

sourcegraph-syntaxhighlight

JSON →
library0.0.0-20170531221838-bd320f5d308egogounverified

Package syntaxhighlight provides syntax highlighting for code using a language-independent lexer.

go get github.com/sourcegraph/syntaxhighlight
INSTALL
IMPORT
SIG · SOURCEGRAPH-SYNTAX
S
sourcegraph-syntaxhighlight
utilitygov0.0.0-20170531221838-bd320f5d308e
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

syntaxhighlight
github.com/sourcegraph/syntaxhighlight

Highlight Go source code and output HTML

package main import ( "fmt" "github.com/sourcegraph/syntaxhighlight" ) func main() { highlighted, _ := syntaxhighlight.AsHTML([]byte("package main\n"), syntaxhighlight.DefaultOptions) fmt.Println(string(highlighted)) }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
0.0.0-20170531221838-bd320f5d308elatest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
4 hits · last 30 days
node
4
Resources
sourcegraph-syntaxhighlight — go get sourcegraph-syntaxhighlight · libregistry