Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kentaro-m/blackfriday-confluence
🛠Blackfriday-Confluence is confluence wiki renderer for the Blackfriday v2 markdown processor.
https://github.com/kentaro-m/blackfriday-confluence
blackfriday confluence confluence-markup golang markdown markdown-parser
Last synced: about 2 months ago
JSON representation
🛠Blackfriday-Confluence is confluence wiki renderer for the Blackfriday v2 markdown processor.
- Host: GitHub
- URL: https://github.com/kentaro-m/blackfriday-confluence
- Owner: kentaro-m
- License: mit
- Created: 2018-03-31T14:07:03.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2022-04-25T11:36:44.000Z (over 2 years ago)
- Last Synced: 2024-10-10T21:19:02.879Z (2 months ago)
- Topics: blackfriday, confluence, confluence-markup, golang, markdown, markdown-parser
- Language: Go
- Homepage:
- Size: 31.3 KB
- Stars: 22
- Watchers: 2
- Forks: 12
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE.md
Awesome Lists containing this project
README
# Blackfriday-Confluence
[![godoc](https://img.shields.io/badge/godoc-reference-orange.svg?style=flat-square)](https://godoc.org/github.com/kentaro-m/blackfriday-confluence)
[![Coverage Status](https://coveralls.io/repos/github/kentaro-m/blackfriday-confluence/badge.svg?branch=add-goveralls)](https://coveralls.io/github/kentaro-m/blackfriday-confluence?branch=add-goveralls)
[![Go Report Card](https://goreportcard.com/badge/github.com/kentaro-m/blackfriday-confluence)](https://goreportcard.com/report/github.com/kentaro-m/blackfriday-confluence)
[![license](https://img.shields.io/github/license/kentaro-m/blackfriday-confluence.svg?style=flat-square)](https://github.com/kentaro-m/blackfriday-confluence/blob/master/LICENSE.md)Blackfriday-Confluence is confluence wiki renderer for the [Blackfriday v2](https://github.com/russross/blackfriday) markdown processor.
## Features
* :pencil2:Confluence wiki output
* :angel:Support for some of the [Confluence Wiki Markup](https://confluence.atlassian.com/confcloud/confluence-wiki-markup-938044804.html)## Installation
```
$ go get -u github.com/kentaro-m/blackfriday-confluence
```## Usage
```go
import (
bf "github.com/russross/blackfriday/v2"
bfconfluence "github.com/kentaro-m/blackfriday-confluence"
)// ...
renderer := &bfconfluence.Renderer{}
extensions := bf.CommonExtensions
md := bf.New(bf.WithRenderer(renderer), bf.WithExtensions(extensions))
input := "# sample text" // # sample text
ast := md.Parse([]byte(input))
output := renderer.Render(ast) // h1. sample text
fmt.Printf("%s\n", output)
// ...
```## Examples
### Input
```
# Section
Some _Markdown_ text.## Subsection
Foobar.### Subsubsection
Fuga> quote
- - - -
**strong text**
~~strikethrough text~~
[Example Domain](http://www.example.com/)
![](https://blog.golang.org/gopher/header.jpg)* list1
* list2
* list3hoge
1. number1
2. number2
3. number3First Header | Second Header
------------- | -------------
Content Cell | Content Cell
Content Cell | Content Cell|a |b |c |
|---|---|---|
|1 |2 |3 |
|4 |5 |6 |
``````go
package main
import "fmt"
func main() {
fmt.Println("hello world")
}
```### Output
```
h1. Section
Some _Markdown_ text.h2. Subsection
Foobar.h3. Subsubsection
Fuga{quote}
quote{quote}
----
*strong text*
-strikethrough text-
[http://www.example.com/|Example Domain]
!https://blog.golang.org/gopher/header.jpg!* list1
* list2
* list3hoge
# number1
# number2
# number3||First Header||Second Header||
|Content Cell|Content Cell|
|Content Cell|Content Cell|||a||b||c||
|1|2|3|
|4|5|6|
``````
{code:language=go}
package main
import "fmt"
func main() {
fmt.Println("hello world")
}
{code}
```## Documentation
[GoDoc](https://godoc.org/github.com/kentaro-m/blackfriday-confluence)## Contributing
### Issue
* :bug: Report a bug
* :gift: Request a featurePlease use the [GitHub Issue](https://github.com/kentaro-m/blackfriday-confluence/issues) to create a issue.
### Pull Request
1. Fork it ()
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](https://github.com/Ambrevar/blackfriday-latex).## License
[MIT](https://github.com/kentaro-m/blackfriday-confluence/blob/master/LICENSE.md)