slackdown

package module
v0.1.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 18, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

README

blackfriday-slack

A Blackfriday v2 Renderer which translates markdown to slack styling

godoc license Go Report Card

Installation

$ go get -u github.com/karriereat/blackfriday-slack

Examples

Input

i had to mask the code block for this example

# head1

## head2
- list1
- list2
- list3

### head3
* list4
* list5
* list6

### head3
* list1
  * list 2
  * list 3
    * list 4
    * list 5
      * list 6
      * list 7
  * list 8
* list 9

### head4
1. list1
2. list2
3. list3
  1. list4
  2. list5
4. list6

---
`code`
---

\``` go
    code block 
    such code block - much wow
```\

Output

output image

Documentation

GoDoc

Thanks

Blackfriday-Slack is heavily inspired by Blackfriday-Confluence

License

Apache 2.0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(input []byte, opts ...bf.Option) []byte

Run prints out the confluence document.

Types

type Renderer

type Renderer struct {
	// contains filtered or unexported fields
}

Renderer is the rendering interface for slack output.

func (*Renderer) Render

func (r *Renderer) Render(ast *bf.Node) []byte

Render prints out the whole document from the ast.

func (*Renderer) RenderFooter

func (r *Renderer) RenderFooter(w io.Writer, ast *bf.Node)

RenderFooter writes document footer (unused).

func (*Renderer) RenderHeader

func (r *Renderer) RenderHeader(w io.Writer, ast *bf.Node)

RenderHeader writes document header (unused).

func (*Renderer) RenderNode

func (r *Renderer) RenderNode(w io.Writer, node *bf.Node, entering bool) bf.WalkStatus

RenderNode parses a single node of a syntax tree.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL