55// Distributed under the Simplified BSD License.
66// See README.md for details.
77
8+ //nolint:gocritic,wastedassign,unused,revive,govet // ignore blackfriday
89package blackfriday
910
1011import (
@@ -345,8 +346,8 @@ func WithNoExtensions() Option {
345346// In Markdown, the link reference syntax can be made to resolve a link to
346347// a reference instead of an inline URL, in one of the following ways:
347348//
348- // * [link text][refid]
349- // * [refid][]
349+ // - [link text][refid]
350+ // - [refid][]
350351//
351352// Usually, the refid is defined at the bottom of the Markdown document. If
352353// this override function is provided, the refid is passed to the override
@@ -363,21 +364,25 @@ func WithRefOverride(o ReferenceOverrideFunc) Option {
363364// block of markdown-encoded text.
364365//
365366// The simplest invocation of Run takes one argument, input:
366- // output := Run(input)
367+ //
368+ // output := Run(input)
369+ //
367370// This will parse the input with CommonExtensions enabled and render it with
368371// the default HTMLRenderer (with CommonHTMLFlags).
369372//
370373// Variadic arguments opts can customize the default behavior. Since Markdown
371374// type does not contain exported fields, you can not use it directly. Instead,
372375// use the With* functions. For example, this will call the most basic
373376// functionality, with no extensions:
374- // output := Run(input, WithNoExtensions())
377+ //
378+ // output := Run(input, WithNoExtensions())
375379//
376380// You can use any number of With* arguments, even contradicting ones. They
377381// will be applied in order of appearance and the latter will override the
378382// former:
379- // output := Run(input, WithNoExtensions(), WithExtensions(exts),
380- // WithRenderer(yourRenderer))
383+ //
384+ // output := Run(input, WithNoExtensions(), WithExtensions(exts),
385+ // WithRenderer(yourRenderer))
381386func Run (input []byte , opts ... Option ) []byte {
382387 r := NewHTMLRenderer (HTMLRendererParameters {
383388 Flags : CommonHTMLFlags ,
@@ -491,35 +496,35 @@ func (p *Markdown) parseRefsToAST() {
491496//
492497// Consider this markdown with reference-style links:
493498//
494- // [link][ref]
499+ // [link][ref]
495500//
496- // [ref]: /url/ "tooltip title"
501+ // [ref]: /url/ "tooltip title"
497502//
498503// It will be ultimately converted to this HTML:
499504//
500- // <p><a href=\"/url/\" title=\"title\">link</a></p>
505+ // <p><a href=\"/url/\" title=\"title\">link</a></p>
501506//
502507// And a reference structure will be populated as follows:
503508//
504- // p.refs["ref"] = &reference{
505- // link: "/url/",
506- // title: "tooltip title",
507- // }
509+ // p.refs["ref"] = &reference{
510+ // link: "/url/",
511+ // title: "tooltip title",
512+ // }
508513//
509514// Alternatively, reference can contain information about a footnote. Consider
510515// this markdown:
511516//
512- // Text needing a footnote.[^a]
517+ // Text needing a footnote.[^a]
513518//
514- // [^a]: This is the note
519+ // [^a]: This is the note
515520//
516521// A reference structure will be populated as follows:
517522//
518- // p.refs["a"] = &reference{
519- // link: "a",
520- // title: "This is the note",
521- // noteID: <some positive int>,
522- // }
523+ // p.refs["a"] = &reference{
524+ // link: "a",
525+ // title: "This is the note",
526+ // noteID: <some positive int>,
527+ // }
523528//
524529// TODO: As you can see, it begs for splitting into two dedicated structures
525530// for refs and for footnotes.
0 commit comments