...
 
Commits (2)
...@@ -96,7 +96,7 @@ type svgWriter struct { ...@@ -96,7 +96,7 @@ type svgWriter struct {
} }
var ( var (
tagSVG = []byte(`<svg xmlns="http://www.w3.org/2000/svg" version="1.1"`) tagSVG = []byte(`<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1"`)
tagSVGClose = []byte(`</svg>`) tagSVGClose = []byte(`</svg>`)
tagDefs = []byte(`<defs>`) tagDefs = []byte(`<defs>`)
tagDefsClose = []byte(`</defs>`) tagDefsClose = []byte(`</defs>`)
...@@ -111,7 +111,7 @@ var ( ...@@ -111,7 +111,7 @@ var (
attFontFamily = []byte(` font-family="`) attFontFamily = []byte(` font-family="`)
attFontSize = []byte(` font-size="`) attFontSize = []byte(` font-size="`)
attHeight = []byte(` height="`) attHeight = []byte(` height="`)
attHref = []byte(` href="`) attHref = []byte(` xlink:href="`)
attID = []byte(` id="`) attID = []byte(` id="`)
attTransform = []byte(` transform="`) attTransform = []byte(` transform="`)
attWidth = []byte(` width="`) attWidth = []byte(` width="`)
...@@ -201,6 +201,7 @@ func (w *svgWriter) writeDefs(g chess.Game, rowSize int, boardSizeStr, rowSizeSt ...@@ -201,6 +201,7 @@ func (w *svgWriter) writeDefs(g chess.Game, rowSize int, boardSizeStr, rowSizeSt
if p == chess.Empty || seen[p] { if p == chess.Empty || seen[p] {
continue continue
} }
seen[p] = true
w.write(tagGroup) w.write(tagGroup)
w.write(attID) w.write(attID)
w.writeByte(byte(p.Rune())) w.writeByte(byte(p.Rune()))
......