diff --git a/go.mod b/go.mod index 558255a..004dd0d 100644 --- a/go.mod +++ b/go.mod @@ -1,5 +1,7 @@ module humungus.tedunangst.com/r/honk +go 1.11 + require ( github.com/andybalholm/cascadia v1.1.0 github.com/gorilla/mux v1.7.3 @@ -7,7 +9,5 @@ require ( golang.org/x/crypto v0.0.0-20190621222207-cc06ce4a13d4 golang.org/x/net v0.0.0-20190620200207-3b0461eec859 humungus.tedunangst.com/r/go-sqlite3 v1.1.3 - humungus.tedunangst.com/r/webs v0.6.35 + humungus.tedunangst.com/r/webs v0.6.36 ) - -go 1.11 diff --git a/go.sum b/go.sum index e80e517..b763b21 100644 --- a/go.sum +++ b/go.sum @@ -22,5 +22,5 @@ golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= humungus.tedunangst.com/r/go-sqlite3 v1.1.3 h1:G2N4wzDS0NbuvrZtQJhh4F+3X+s7BF8b9ga8k38geUI= humungus.tedunangst.com/r/go-sqlite3 v1.1.3/go.mod h1:FtEEmQM7U2Ey1TuEEOyY1BmphTZnmiEjPsNLEAkpf/M= -humungus.tedunangst.com/r/webs v0.6.35 h1:+mevZFBQ6KjiGX9Z4A/vmvlsvJe8Lf8LpkQBdN2MbEU= -humungus.tedunangst.com/r/webs v0.6.35/go.mod h1:S9sXpVSbgAIa24yYhnMN0C94LKHG+2rioS+NsiDimps= +humungus.tedunangst.com/r/webs v0.6.36 h1:Y0V6sYwruiradsyP2Y4EzQ3T+kZxrtUfuC7Bwu0GRsY= +humungus.tedunangst.com/r/webs v0.6.36/go.mod h1:S9sXpVSbgAIa24yYhnMN0C94LKHG+2rioS+NsiDimps= diff --git a/markitzero.go b/markitzero.go index 0253a2f..7641587 100644 --- a/markitzero.go +++ b/markitzero.go @@ -98,15 +98,31 @@ func markitzero(s string) string { rows := strings.Split(m, "\n") var r strings.Builder r.WriteString("
") + switch cell { + case ":---": + alignments[i] = `style="text-align: left"` + continue + case ":---:": + alignments[i] = `style="text-align: center"` + continue + case "---:": + alignments[i] = `style="text-align: right"` + continue + } + if !hastr { + r.WriteString(" |
", alignments[i]) r.WriteString(cell) } } |