notes on ro dont have comments
parent
b975a7c103
commit
f60d0618e6
|
|
@ -115,7 +115,7 @@ func (n *Notes) commentFormer(urlPath string, md []byte) html.RenderNodeFunc {
|
|||
}
|
||||
}
|
||||
return func(w io.Writer, node ast.Node, entering bool) (ast.WalkStatus, bool) {
|
||||
if heading, ok := node.(*ast.Heading); ok && !entering {
|
||||
if heading, ok := node.(*ast.Heading); !n.ro && ok && !entering {
|
||||
nextHeader()
|
||||
fmt.Fprintf(w, `
|
||||
<form method="POST" action=%q class="comment">
|
||||
|
|
|
|||
|
|
@ -4,10 +4,12 @@ import "local/notes-server/config"
|
|||
|
||||
type Notes struct {
|
||||
root string
|
||||
ro bool
|
||||
}
|
||||
|
||||
func New() *Notes {
|
||||
return &Notes{
|
||||
root: config.Root,
|
||||
ro: config.ReadOnly,
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue