From 2c1e9331ba9025e8f2d5369e94e510c32a86402e Mon Sep 17 00:00:00 2001 From: Daniil Gentili Date: Thu, 24 Aug 2023 08:25:27 +0200 Subject: [PATCH] Change namespace for PR --- block.go | 2 +- block_test.go | 6 +++--- doc.go | 4 ++-- go.mod | 2 +- helpers_test.go | 2 +- html.go | 2 +- inline.go | 6 ++++-- inline_test.go | 2 +- markdown.go | 46 +++++++++++++++++++++++++--------------------- markdown_test.go | 6 +++--- ref_test.go | 2 +- smartypants.go | 2 +- 12 files changed, 44 insertions(+), 38 deletions(-) diff --git a/block.go b/block.go index 0150256..dcd61e6 100644 --- a/block.go +++ b/block.go @@ -1,6 +1,6 @@ // // Blackfriday Markdown Processor -// Available at http://github.com/danog/blackfriday +// Available at http://github.com/russross/blackfriday // // Copyright © 2011 Russ Ross . // Distributed under the Simplified BSD License. diff --git a/block_test.go b/block_test.go index 20ddc71..c339dee 100644 --- a/block_test.go +++ b/block_test.go @@ -1,6 +1,6 @@ // // Blackfriday Markdown Processor -// Available at http://github.com/danog/blackfriday +// Available at http://github.com/russross/blackfriday // // Copyright © 2011 Russ Ross . // Distributed under the Simplified BSD License. @@ -1589,7 +1589,7 @@ func TestListWithFencedCodeBlock(t *testing.T) { var tests = []string{ "1. one\n\n ```\n code\n ```\n\n2. two\n", "
    \n
  1. one

    \n\n
    code\n
  2. \n\n
  3. two

  4. \n
\n", - // https://github.com/danog/blackfriday/issues/239 + // https://github.com/russross/blackfriday/issues/239 "1. one\n\n ```\n - code\n ```\n\n2. two\n", "
    \n
  1. one

    \n\n
    - code\n
  2. \n\n
  3. two

  4. \n
\n", } @@ -1600,7 +1600,7 @@ func TestListWithMalformedFencedCodeBlock(t *testing.T) { t.Parallel() // Ensure that in the case of an unclosed fenced code block in a list, // no source gets ommitted (even if it is malformed). - // See danog/blackfriday#372 for context. + // See russross/blackfriday#372 for context. var tests = []string{ "1. one\n\n ```\n code\n\n2. two\n", "
    \n
  1. one\n```\ncode\n2. two
  2. \n
\n", diff --git a/doc.go b/doc.go index fe1f37c..2a5cc5b 100644 --- a/doc.go +++ b/doc.go @@ -14,9 +14,9 @@ // to the Markdown processor. // // If you're interested in calling Blackfriday from command line, see -// https://github.com/danog/blackfriday-tool. +// https://github.com/russross/blackfriday-tool. // -// Sanitized Anchor Names +// # Sanitized Anchor Names // // Blackfriday includes an algorithm for creating sanitized anchor names // corresponding to a given input text. This algorithm is used to create diff --git a/go.mod b/go.mod index 065a5a5..8d717a9 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/danog/blackfriday/v2 +module github.com/russross/blackfriday/v2 go 1.17 diff --git a/helpers_test.go b/helpers_test.go index 154b2d1..420e794 100644 --- a/helpers_test.go +++ b/helpers_test.go @@ -1,6 +1,6 @@ // // Blackfriday Markdown Processor -// Available at http://github.com/danog/blackfriday +// Available at http://github.com/russross/blackfriday // // Copyright © 2011 Russ Ross . // Distributed under the Simplified BSD License. diff --git a/html.go b/html.go index 2d679fa..d50666b 100644 --- a/html.go +++ b/html.go @@ -1,6 +1,6 @@ // // Blackfriday Markdown Processor -// Available at http://github.com/danog/blackfriday +// Available at http://github.com/russross/blackfriday // // Copyright © 2011 Russ Ross . // Distributed under the Simplified BSD License. diff --git a/inline.go b/inline.go index f0df681..e13d425 100644 --- a/inline.go +++ b/inline.go @@ -1,6 +1,6 @@ // // Blackfriday Markdown Processor -// Available at http://github.com/danog/blackfriday +// Available at http://github.com/russross/blackfriday // // Copyright © 2011 Russ Ross . // Distributed under the Simplified BSD License. @@ -735,7 +735,9 @@ func linkEndsWithEntity(data []byte, linkEnd int) bool { } // hasPrefixCaseInsensitive is a custom implementation of -// strings.HasPrefix(strings.ToLower(s), prefix) +// +// strings.HasPrefix(strings.ToLower(s), prefix) +// // we rolled our own because ToLower pulls in a huge machinery of lowercasing // anything from Unicode and that's very slow. Since this func will only be // used on ASCII protocol prefixes, we can take shortcuts. diff --git a/inline_test.go b/inline_test.go index 244d68a..5a91d8a 100644 --- a/inline_test.go +++ b/inline_test.go @@ -1,6 +1,6 @@ // // Blackfriday Markdown Processor -// Available at http://github.com/danog/blackfriday +// Available at http://github.com/russross/blackfriday // // Copyright © 2011 Russ Ross . // Distributed under the Simplified BSD License. diff --git a/markdown.go b/markdown.go index cf9040b..382db9e 100644 --- a/markdown.go +++ b/markdown.go @@ -1,5 +1,5 @@ // Blackfriday Markdown Processor -// Available at http://github.com/danog/blackfriday +// Available at http://github.com/russross/blackfriday // // Copyright © 2011 Russ Ross . // Distributed under the Simplified BSD License. @@ -345,8 +345,8 @@ func WithNoExtensions() Option { // In Markdown, the link reference syntax can be made to resolve a link to // a reference instead of an inline URL, in one of the following ways: // -// * [link text][refid] -// * [refid][] +// - [link text][refid] +// - [refid][] // // Usually, the refid is defined at the bottom of the Markdown document. If // this override function is provided, the refid is passed to the override @@ -363,7 +363,9 @@ func WithRefOverride(o ReferenceOverrideFunc) Option { // block of markdown-encoded text. // // The simplest invocation of Run takes one argument, input: -// output := Run(input) +// +// output := Run(input) +// // This will parse the input with CommonExtensions enabled and render it with // the default HTMLRenderer (with CommonHTMLFlags). // @@ -371,13 +373,15 @@ func WithRefOverride(o ReferenceOverrideFunc) Option { // type does not contain exported fields, you can not use it directly. Instead, // use the With* functions. For example, this will call the most basic // functionality, with no extensions: -// output := Run(input, WithNoExtensions()) +// +// output := Run(input, WithNoExtensions()) // // You can use any number of With* arguments, even contradicting ones. They // will be applied in order of appearance and the latter will override the // former: -// output := Run(input, WithNoExtensions(), WithExtensions(exts), -// WithRenderer(yourRenderer)) +// +// output := Run(input, WithNoExtensions(), WithExtensions(exts), +// WithRenderer(yourRenderer)) func Run(input []byte, opts ...Option) []byte { r := NewHTMLRenderer(HTMLRendererParameters{ Flags: CommonHTMLFlags, @@ -491,35 +495,35 @@ func (p *Markdown) parseRefsToAST() { // // Consider this markdown with reference-style links: // -// [link][ref] +// [link][ref] // -// [ref]: /url/ "tooltip title" +// [ref]: /url/ "tooltip title" // // It will be ultimately converted to this HTML: // -//

link

+//

link

// // And a reference structure will be populated as follows: // -// p.refs["ref"] = &reference{ -// link: "/url/", -// title: "tooltip title", -// } +// p.refs["ref"] = &reference{ +// link: "/url/", +// title: "tooltip title", +// } // // Alternatively, reference can contain information about a footnote. Consider // this markdown: // -// Text needing a footnote.[^a] +// Text needing a footnote.[^a] // -// [^a]: This is the note +// [^a]: This is the note // // A reference structure will be populated as follows: // -// p.refs["a"] = &reference{ -// link: "a", -// title: "This is the note", -// noteID: , -// } +// p.refs["a"] = &reference{ +// link: "a", +// title: "This is the note", +// noteID: , +// } // // TODO: As you can see, it begs for splitting into two dedicated structures // for refs and for footnotes. diff --git a/markdown_test.go b/markdown_test.go index dc9289d..078dcda 100644 --- a/markdown_test.go +++ b/markdown_test.go @@ -1,6 +1,6 @@ // // Blackfriday Markdown Processor -// Available at http://github.com/danog/blackfriday +// Available at http://github.com/russross/blackfriday // // Copyright © 2011 Russ Ross . // Distributed under the Simplified BSD License. @@ -26,12 +26,12 @@ func TestDocument(t *testing.T) { "", // This shouldn't panic. - // https://github.com/danog/blackfriday/issues/172 + // https://github.com/russross/blackfriday/issues/172 "[]:<", "

[]:<

\n", // This shouldn't panic. - // https://github.com/danog/blackfriday/issues/173 + // https://github.com/russross/blackfriday/issues/173 " [", "

[

\n", } diff --git a/ref_test.go b/ref_test.go index 36ac53c..a2e689c 100644 --- a/ref_test.go +++ b/ref_test.go @@ -1,6 +1,6 @@ // // Blackfriday Markdown Processor -// Available at http://github.com/danog/blackfriday +// Available at http://github.com/russross/blackfriday // // Copyright © 2011 Russ Ross . // Distributed under the Simplified BSD License. diff --git a/smartypants.go b/smartypants.go index 75ad98f..3a220e9 100644 --- a/smartypants.go +++ b/smartypants.go @@ -1,6 +1,6 @@ // // Blackfriday Markdown Processor -// Available at http://github.com/danog/blackfriday +// Available at http://github.com/russross/blackfriday // // Copyright © 2011 Russ Ross . // Distributed under the Simplified BSD License.