Skip to content

Commit a47518d

Browse files
committed
[SQUASH] Doc update
1 parent 3cc9341 commit a47518d

File tree

2 files changed

+12
-11
lines changed

2 files changed

+12
-11
lines changed

doc.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@
44
// then be further processed to HTML (provided by Blackfriday itself) or other
55
// formats (provided by the community).
66
//
7-
// The simplest way to invoke Blackfriday is to call one of Markdown*
8-
// functions. It will take a text input and produce a text output in HTML (or
9-
// other format).
7+
// The simplest way to invoke Blackfriday is to call the Markdown function. It
8+
// will take a text input and produce a text output in HTML (or other format).
109
//
11-
// A slightly more sophisticated way to use Blackfriday is to call Parse, which
12-
// returns a syntax tree for the input document. You can use that to write your
13-
// own renderer or, for example, to leverage Blackfriday's parsing for content
14-
// extraction from markdown documents.
10+
// A slightly more sophisticated way to use Blackfriday is to create a Processor
11+
// and to call Parse, which returns a syntax tree for the input document. You
12+
// can leverage Blackfriday's parsing for content extraction from markdown
13+
// documents. You can assign a custom renderer and set various options to the
14+
// Processor.
1515
//
1616
// If you're interested in calling Blackfriday from command line, see
1717
// https://github.com/russross/blackfriday-tool.

markdown.go

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -156,8 +156,9 @@ type Renderer interface {
156156
// for each character that triggers a response when parsing inline data.
157157
type inlineParser func(p *Processor, data []byte, offset int) (int, *Node)
158158

159-
// Processor holds runtime state used by the parser.
160-
// This is constructed by the Markdown function.
159+
// Processor holds:
160+
// - extensions and the runtime state used by Parse,
161+
// - the renderer.
161162
type Processor struct {
162163
renderer Renderer
163164
referenceOverride ReferenceOverrideFunc
@@ -254,8 +255,8 @@ type Reference struct {
254255
// See the documentation in Options for more details on use-case.
255256
type ReferenceOverrideFunc func(reference string) (ref *Reference, overridden bool)
256257

257-
// NewProcessor constructs a Parser. You can use the same With* functions as for
258-
// Markdown() to customize parser's behavior.
258+
// NewProcessor constructs a Processor. You can use the same With* functions as
259+
// for Markdown() to customize parser's behavior.
259260
func NewProcessor(opts ...Option) *Processor {
260261
var p Processor
261262
for _, opt := range opts {

0 commit comments

Comments
 (0)