mirror of
https://github.com/alecthomas/chroma.git
synced 2026-06-20 11:35:42 +02:00
Add hlb lexer (#332)
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
fs default() {
|
||||
gofmt fs { chromaLexer "pygments.lexers.hlb.HlbLexer"; }
|
||||
}
|
||||
|
||||
fs script() {
|
||||
local "." with option {
|
||||
includePatterns "pygments2chroma.py"
|
||||
}
|
||||
}
|
||||
|
||||
fs runChromaPython(string package) {
|
||||
image "python:alpine" with option { resolve; }
|
||||
run "apk add -U git"
|
||||
run "pip install -U pystache"
|
||||
run "pip install -U -e git+https://github.com/hinshun/pygments.git@hlb-lexer#egg=pygments"
|
||||
run string { format "python pygments2chroma.py %s > /out/lexer.go" package; } with option {
|
||||
dir "/chroma"
|
||||
mount script "/chroma"
|
||||
mount fs { scratch; } "/out" as chromaLexer
|
||||
}
|
||||
}
|
||||
|
||||
fs runGoFormat(fs goFiles) {
|
||||
image "golang:alpine" with option { resolve; }
|
||||
run "gofmt -s -w /gofmt/*.go" with option {
|
||||
dir "/gofmt"
|
||||
mount goFiles "/gofmt" as gofmt
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user