Skip to content

yendefrr/bbmd

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

bbmd

Go library that converts BBCode markup to Markdown.

Supported tags

BBCode Output
[b]...[/b] **...**
[i]...[/i] *...*
[s]...[/s] ~~...~~
[u]...[/u] stripped (no Markdown equivalent)
[h1]...[/h3] # / ## / ###
[url=...]...[/url] [...](...)
[img]...[/img] ![](...)
[code]...[/code] fenced code block
[code=lang]...[/code] fenced code block with language
[quote]...[/quote] > ...
[list] / [list=1] unordered / ordered list
[table] / [tr] / [th] / [td] Markdown table
[color], [size], [font], [align] stripped

Unrecognized tags are stripped; their content is preserved.

Installation

go get github.com/yendefrr/bbmd

Usage

import "github.com/yendefrr/bbmd"

md := bbmd.ToMarkdown("[b]Hello[/b] [i]world[/i]")
// **Hello** *world*

License

MIT

About

Lib to convert BBCode to Markdown

Topics

Resources

License

Stars

Watchers

Forks

Contributors

Languages