项目作者: kentaro-m

项目描述 :
🛠 Blackfriday-Confluence is confluence wiki renderer for the Blackfriday v2 markdown processor.
高级语言: Go
项目地址: git://github.com/kentaro-m/blackfriday-confluence.git
创建时间: 2018-03-31T14:07:03Z
项目社区:https://github.com/kentaro-m/blackfriday-confluence

开源协议:MIT License

下载


Blackfriday-Confluence

godoc
Coverage Status
Go Report Card
license

Blackfriday-Confluence is confluence wiki renderer for the Blackfriday v2 markdown processor.

Features

Installation

  1. $ go get -u github.com/kentaro-m/blackfriday-confluence

Usage

  1. import (
  2. bf "github.com/russross/blackfriday/v2"
  3. bfconfluence "github.com/kentaro-m/blackfriday-confluence"
  4. )
  5. // ...
  6. renderer := &bfconfluence.Renderer{}
  7. extensions := bf.CommonExtensions
  8. md := bf.New(bf.WithRenderer(renderer), bf.WithExtensions(extensions))
  9. input := "# sample text" // # sample text
  10. ast := md.Parse([]byte(input))
  11. output := renderer.Render(ast) // h1. sample text
  12. fmt.Printf("%s\n", output)
  13. // ...

Examples

Input

  1. # Section
  2. Some _Markdown_ text.
  3. ## Subsection
  4. Foobar.
  5. ### Subsubsection
  6. Fuga
  7. > quote
  8. - - - -
  9. **strong text**
  10. ~~strikethrough text~~
  11. [Example Domain](http://www.example.com/)
  12. ![](https://blog.golang.org/gopher/header.jpg)
  13. * list1
  14. * list2
  15. * list3
  16. hoge
  17. 1. number1
  18. 2. number2
  19. 3. number3
  20. First Header | Second Header
  21. ------------- | -------------
  22. Content Cell | Content Cell
  23. Content Cell | Content Cell
  24. |a |b |c |
  25. |---|---|---|
  26. |1 |2 |3 |
  27. |4 |5 |6 |
  1. package main
  2. import "fmt"
  3. func main() {
  4. fmt.Println("hello world")
  5. }

Output

  1. h1. Section
  2. Some _Markdown_ text.
  3. h2. Subsection
  4. Foobar.
  5. h3. Subsubsection
  6. Fuga
  7. {quote}
  8. quote
  9. {quote}
  10. ----
  11. *strong text*
  12. -strikethrough text-
  13. [http://www.example.com/|Example Domain]
  14. !https://blog.golang.org/gopher/header.jpg!
  15. * list1
  16. * list2
  17. * list3
  18. hoge
  19. # number1
  20. # number2
  21. # number3
  22. ||First Header||Second Header||
  23. |Content Cell|Content Cell|
  24. |Content Cell|Content Cell|
  25. ||a||b||c||
  26. |1|2|3|
  27. |4|5|6|
  1. {code:language=go}
  2. package main
  3. import "fmt"
  4. func main() {
  5. fmt.Println("hello world")
  6. }
  7. {code}

Documentation

GoDoc

Contributing

Issue

  • :bug: Report a bug
  • :gift: Request a feature

Please use the GitHub Issue to create a issue.

Pull Request

  1. Fork it (https://github.com/kentaro-m/blackfriday-confluence/fork)
  2. Create your feature branch
  3. Run the test ($ go test) and make sure it passed :white_check_mark:
  4. Commit your changes :pencil:
  5. Push to the branch
  6. Create a new Pull Request :heart:

Thanks

Blackfriday-Confluence is inspired by Blackfriday-LaTeX.

License

MIT