Skip to content

Commit 845529c

Browse files
committed
use vendored pygmentize
1 parent 8d31ec1 commit 845529c

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

tools/generate.go

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import (
1515

1616
var cacheDir = "/tmp/gobyexample-cache"
1717
var siteDir = "./public"
18-
var pygmentizeBin = ""
18+
var pygmentizeBin = "./vendor/pygments/pygmentize"
1919

2020
func check(err error) {
2121
if err != nil {
@@ -106,12 +106,6 @@ func whichLexer(path string) string {
106106
return ""
107107
}
108108

109-
func whichPygmentize() {
110-
bin, err := exec.LookPath("pygmentize")
111-
check(err)
112-
pygmentizeBin = bin
113-
}
114-
115109
func debug(msg string) {
116110
if os.Getenv("DEBUG") == "1" {
117111
fmt.Fprintln(os.Stderr, msg)
@@ -245,7 +239,6 @@ func renderExamples(examples []*Example) {
245239
}
246240

247241
func main() {
248-
whichPygmentize()
249242
copyFile("templates/site.css", siteDir+"/site.css")
250243
copyFile("templates/favicon.ico", siteDir+"/favicon.ico")
251244
copyFile("templates/404.html", siteDir+"/404.html")

0 commit comments

Comments
 (0)