cosmetics
This commit is contained in:
parent
4071eb731f
commit
1bbd55c017
@ -160,8 +160,8 @@ func (p *Parser) preformat(r io.Reader) (s string) {
|
||||
break
|
||||
}
|
||||
i0 := 0
|
||||
for i := range buf[:n] {
|
||||
switch buf[i] {
|
||||
for i, c := range buf[:n] {
|
||||
switch c {
|
||||
case '\t':
|
||||
b.Write(buf[i0:i])
|
||||
for ; charstotab > 0; charstotab-- {
|
||||
|
@ -86,6 +86,7 @@ func (w *htmlOut) str(s string) *htmlOut {
|
||||
var ws string
|
||||
var i0 = 0
|
||||
|
||||
o := w.obfuscate
|
||||
for i, r := range s {
|
||||
switch r {
|
||||
case '&':
|
||||
@ -97,7 +98,7 @@ func (w *htmlOut) str(s string) *htmlOut {
|
||||
case '"':
|
||||
ws = """
|
||||
default:
|
||||
if w.obfuscate {
|
||||
if o {
|
||||
if rand.Intn(2) == 0 {
|
||||
ws = fmt.Sprintf("&#%d;", r)
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user