summaryrefslogtreecommitdiffstats
path: root/vendor/github.com/russross/blackfriday/doc.go
diff options
context:
space:
mode:
authorWim <wim@42.be>2019-02-24 15:13:56 +0100
committerWim <wim@42.be>2019-02-24 15:13:56 +0100
commit96841c70c7d59d1c80f98db7dcdfc03620829758 (patch)
treedf43223b443ab43949c68b265dee518ff3455c47 /vendor/github.com/russross/blackfriday/doc.go
parentf92735d35d01388ca790c43ef54548ecafae6f92 (diff)
downloadmatterbridge-msglm-96841c70c7d59d1c80f98db7dcdfc03620829758.tar.gz
matterbridge-msglm-96841c70c7d59d1c80f98db7dcdfc03620829758.tar.bz2
matterbridge-msglm-96841c70c7d59d1c80f98db7dcdfc03620829758.zip
Fix regression in HTML handling (telegram). Closes #734
* Revert back to blackfriday v1 * Add testing
Diffstat (limited to 'vendor/github.com/russross/blackfriday/doc.go')
-rw-r--r--vendor/github.com/russross/blackfriday/doc.go40
1 files changed, 27 insertions, 13 deletions
diff --git a/vendor/github.com/russross/blackfriday/doc.go b/vendor/github.com/russross/blackfriday/doc.go
index 5b3fa987..9656c42a 100644
--- a/vendor/github.com/russross/blackfriday/doc.go
+++ b/vendor/github.com/russross/blackfriday/doc.go
@@ -1,18 +1,32 @@
-// Package blackfriday is a markdown processor.
+// Package blackfriday is a Markdown processor.
//
-// It translates plain text with simple formatting rules into an AST, which can
-// then be further processed to HTML (provided by Blackfriday itself) or other
-// formats (provided by the community).
+// It translates plain text with simple formatting rules into HTML or LaTeX.
//
-// The simplest way to invoke Blackfriday is to call the Run function. It will
-// take a text input and produce a text output in HTML (or other format).
+// Sanitized Anchor Names
//
-// A slightly more sophisticated way to use Blackfriday is to create a Markdown
-// processor and to call Parse, which returns a syntax tree for the input
-// document. You can leverage Blackfriday's parsing for content extraction from
-// markdown documents. You can assign a custom renderer and set various options
-// to the Markdown processor.
+// Blackfriday includes an algorithm for creating sanitized anchor names
+// corresponding to a given input text. This algorithm is used to create
+// anchors for headings when EXTENSION_AUTO_HEADER_IDS is enabled. The
+// algorithm is specified below, so that other packages can create
+// compatible anchor names and links to those anchors.
//
-// If you're interested in calling Blackfriday from command line, see
-// https://github.com/russross/blackfriday-tool.
+// The algorithm iterates over the input text, interpreted as UTF-8,
+// one Unicode code point (rune) at a time. All runes that are letters (category L)
+// or numbers (category N) are considered valid characters. They are mapped to
+// lower case, and included in the output. All other runes are considered
+// invalid characters. Invalid characters that preceed the first valid character,
+// as well as invalid character that follow the last valid character
+// are dropped completely. All other sequences of invalid characters
+// between two valid characters are replaced with a single dash character '-'.
+//
+// SanitizedAnchorName exposes this functionality, and can be used to
+// create compatible links to the anchor names generated by blackfriday.
+// This algorithm is also implemented in a small standalone package at
+// github.com/shurcooL/sanitized_anchor_name. It can be useful for clients
+// that want a small package and don't need full functionality of blackfriday.
package blackfriday
+
+// NOTE: Keep Sanitized Anchor Name algorithm in sync with package
+// github.com/shurcooL/sanitized_anchor_name.
+// Otherwise, users of sanitized_anchor_name will get anchor names
+// that are incompatible with those generated by blackfriday.