<commit_before># Blackfriday Text

Package blackfridaytext contains a text renderer for the Blackfriday Markdown
Processor http://github.com/russross/blackfriday.

## Example Code

```go
package main

import (
    "github.com/gholt/blackfridaytext"
    "io/ioutil"
    "os"
)

func main() {
    opt := &blackfridaytext.Options{Color: true}
    if len(os.Args) == 2 && os.Args[1] == "--no-color" {
        opt.Color = false
    }
    markdown, _ := ioutil.ReadAll(os.Stdin)
    metadata, output := blackfridaytext.MarkdownToText(markdown, opt)
    for _, item := range metadata {
        name, value := item[0], item[1]
        os.Stdout.WriteString(name)
        os.Stdout.WriteString(":\n    ")
        os.Stdout.WriteString(value)
        os.Stdout.WriteString("\n")
    }
    os.Stdout.WriteString("\n")
    os.Stdout.Write(output)
    os.Stdout.WriteString("\n")
}
```

> Copyright 2014 <NAME>. All rights reserved.  
> Use of this source code is governed by a BSD-style  
> license that can be found in the LICENSE file.

---

## Sample Input

To give an idea of what the output looks like, I've run this document through
the renderer and appended the output.

 *  Here is a sample list.
 *  Two
     *  And a sublist.
     *  Two, part B.
 *  Three

*Emphasis*, **Double Emphasis**, ***Triple Emphasis***, ~~Strikethrough~~, and `code spans` along with http://auto/linking and [explicit linking](http://explicit/linking).

Here's a quick table from the blackfriday example:

Name  | Age
------|----
Bob   | 27
Alice | 23

---
<commit_msg>Link to docs, explanation of branches<commit_after># Blackfriday Text

Package blackfridaytext contains a text renderer for the [Blackfriday Markdown
Processor](http://github.com/russross/blackfriday).

[API Documentation](http://godoc.org/github.com/gholt/blackfridaytext)

The master branch is the latest stable version.  
Other branches like v1 are also stable versions.  
The dev branch is the latest development work.  

> Copyright 2014 <NAME>. All rights reserved.  
> Use of this source code is governed by a BSD-style  
> license that can be found in the LICENSE file.

## Example Code

```go
package main

import (
    "github.com/gholt/blackfridaytext"
    "io/ioutil"
    "os"
)

func main() {
    opt := &blackfridaytext.Options{Color: true}
    if len(os.Args) == 2 && os.Args[1] == "--no-color" {
        opt.Color = false
    }
    markdown, _ := ioutil.ReadAll(os.Stdin)
    metadata, output := blackfridaytext.MarkdownToText(markdown, opt)
    for _, item := range metadata {
        name, value := item[0], item[1]
        os.Stdout.WriteString(name)
        os.Stdout.WriteString(":\n    ")
        os.Stdout.WriteString(value)
        os.Stdout.WriteString("\n")
    }
    os.Stdout.WriteString("\n")
    os.Stdout.Write(output)
    os.Stdout.WriteString("\n")
}
```

---

## Sample Input

To give an idea of what the output looks like, I've run this document through
the renderer and appended the output.

 *  Here is a sample list.
 *  Two
     *  And a sublist.
     *  Two, part B.
 *  Three

*Emphasis*, **Double Emphasis**, ***Triple Emphasis***, ~~Strikethrough~~, and `code spans` along with http://auto/linking and [explicit linking](http://explicit/linking).

Here's a quick table from the blackfriday example:

Name  | Age
------|----
Bob   | 27
Alice | 23

---

{'fraction_non_alphanumeric': 0.1324146195326543, 'fraction_numerical': 0.007489514679448772, 'mean_word_length': 2.9797377830750893, 'pattern_counts': {'":': 2, '<': 5, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '154459', 'n_tokens_mistral': 1129, 'n_tokens_neox': 1079, 'n_words': 324}