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