all repos — grayfriday @ 19913a1b7639bcbbe13e7d073f08c6bb098d8254

blackfriday fork with a few changes

Address feedback
Vytautas Ĺ altenis vytas@rtfb.lt
Sun, 30 Jul 2017 19:50:50 +0300
commit

19913a1b7639bcbbe13e7d073f08c6bb098d8254

parent

d5487615af9351eb17f94cae5106cdc0d03bad11

4 files changed, 11 insertions(+), 11 deletions(-)

jump to
M README.mdREADME.md

@@ -62,16 +62,16 @@

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 @@ indentation to mark code blocks, you can explicitly mark them

and supply a language (to make syntax highlighting simple). Just mark it like this: - ``` go + ```go func getTrue() bool { return true }
M html.gohtml.go

@@ -482,8 +482,8 @@ }

} // 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
M markdown.gomarkdown.go

@@ -143,7 +143,7 @@ // for external implementations.

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
M node.gonode.go

@@ -272,8 +272,8 @@ Terminate

) // 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