Address feedback

This commit is contained in:
Vytautas Šaltenis 2017-07-30 19:50:50 +03:00
parent d5487615af
commit 19913a1b76
4 changed files with 11 additions and 11 deletions

View File

@ -62,16 +62,16 @@ Usage
For the most sensible markdown processing, it is as simple as getting your input
into a byte slice and calling:
``` go
output := blackfriday.Run(input)
```go
output := blackfriday.Run(input)
```
Your input will be parsed and the output rendered with a set of most popular
extensions enabled. If you want the most basic feature set, corresponding with
the bare Markdown specification, use:
``` go
output := blackfriday.Run(input, blackfriday.WithNoExtensions())
```go
output := blackfriday.Run(input, blackfriday.WithNoExtensions())
```
### Sanitize untrusted content
@ -82,7 +82,7 @@ through HTML sanitizer such as [Bluemonday][5].
Here's an example of simple usage of Blackfriday together with Bluemonday:
``` go
```go
import (
"github.com/microcosm-cc/bluemonday"
"github.com/russross/blackfriday"
@ -184,7 +184,7 @@ implements the following extensions:
and supply a language (to make syntax highlighting simple). Just
mark it like this:
``` go
```go
func getTrue() bool {
return true
}

View File

@ -482,8 +482,8 @@ func (r *HTMLRenderer) outHRTag(w io.Writer) {
}
// RenderNode is a default renderer of a single node of a syntax tree. For
// block nodes it will be called twice: first time with entering=True, second
// time with entering=False, so that it could know when it's working on an open
// block nodes it will be called twice: first time with entering=true, second
// time with entering=false, so that it could know when it's working on an open
// tag and when on close. It writes the result to w.
//
// The return value is a way to tell the calling walker to adjust its walk

View File

@ -143,7 +143,7 @@ var blockTags = map[string]struct{}{
type Renderer interface {
// RenderNode is the main rendering method. It will be called once for
// every leaf node and twice for every non-leaf node (first with
// entering=True, then with entering=False). The method should write its
// entering=true, then with entering=false). The method should write its
// rendition of the node to the supplied writer w.
RenderNode(w io.Writer, node *Node, entering bool) WalkStatus

View File

@ -272,8 +272,8 @@ const (
)
// NodeVisitor is a callback to be called when traversing the syntax tree.
// Called twice for every node: once with entering=True when the branch is
// first visited, then with entering=False after all the children are done.
// Called twice for every node: once with entering=true when the branch is
// first visited, then with entering=false after all the children are done.
type NodeVisitor func(node *Node, entering bool) WalkStatus
// Walk is a convenience method that instantiates a walker and starts a