go formatting
This commit is contained in:
parent
deed40f168
commit
8774894291
@ -102,31 +102,26 @@ func main() {
|
|||||||
seg.codeRendered = pipe(pygmentizePath, []string{"-l", "go", "-f", "html"}, seg.code+" ")
|
seg.codeRendered = pipe(pygmentizePath, []string{"-l", "go", "-f", "html"}, seg.code+" ")
|
||||||
}
|
}
|
||||||
|
|
||||||
fmt.Printf(`
|
fmt.Printf(`<!DOCTYPE html>
|
||||||
<!DOCTYPE html>
|
<html>
|
||||||
<html>
|
<head>
|
||||||
<head>
|
<meta http-eqiv="content-type" content="text/html;charset=utf-8">
|
||||||
<meta http-eqiv="content-type" content="text/html;charset=utf-8">
|
<title>%s</title>
|
||||||
<title>%s</title>
|
<link rel=stylesheet href="../style/book.css">
|
||||||
<link rel=stylesheet href="../style/book.css">
|
</head>
|
||||||
</head>
|
<body>
|
||||||
<body>
|
<div id="container">
|
||||||
<div id="container">
|
<div id="background"></div>
|
||||||
<div id="background"></div>
|
<table cellspacing="0" cellpadding="0">
|
||||||
<table cellspacing="0" cellpadding="0">
|
<tbody>`, title)
|
||||||
<tbody>`, title)
|
|
||||||
|
|
||||||
for _, seg := range segs {
|
for _, seg := range segs {
|
||||||
fmt.Printf(
|
fmt.Printf(
|
||||||
`<tr>
|
`<tr>
|
||||||
<td class=docs>%s</td>
|
<td class=docs>%s</td>
|
||||||
<td class=code>%s</td>
|
<td class=code>%s</td>
|
||||||
</tr>`, seg.docsRendered, seg.codeRendered)
|
</tr>`, seg.docsRendered, seg.codeRendered)
|
||||||
}
|
}
|
||||||
|
|
||||||
fmt.Print(`</tbody>
|
fmt.Print(`</tbody></table></div></body></html>`)
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
</body>
|
|
||||||
</html>`)
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user