|
|
@ -8,6 +8,7 @@ package highlight
|
|
|
|
import (
|
|
|
|
import (
|
|
|
|
"bufio"
|
|
|
|
"bufio"
|
|
|
|
"bytes"
|
|
|
|
"bytes"
|
|
|
|
|
|
|
|
gohtml "html"
|
|
|
|
"path/filepath"
|
|
|
|
"path/filepath"
|
|
|
|
"strings"
|
|
|
|
"strings"
|
|
|
|
"sync"
|
|
|
|
"sync"
|
|
|
@ -160,7 +161,7 @@ func plainText(code string, numLines int) map[int]string {
|
|
|
|
if content == "" {
|
|
|
|
if content == "" {
|
|
|
|
content = "\n"
|
|
|
|
content = "\n"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
m[line] = content
|
|
|
|
m[line] = gohtml.EscapeString(content)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return m
|
|
|
|
return m
|
|
|
|
}
|
|
|
|
}
|
|
|
|