{"id":36445681,"url":"https://github.com/namreg/bbgo","last_synced_at":"2026-01-11T22:42:54.372Z","repository":{"id":57530257,"uuid":"168416584","full_name":"namreg/bbgo","owner":"namreg","description":"Fast and customizable bbcode parser written in go","archived":false,"fork":false,"pushed_at":"2019-02-19T08:05:51.000Z","size":1626,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-06-20T17:48:06.765Z","etag":null,"topics":["bbcode","bbcode-parser","go"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/namreg.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-01-30T21:16:21.000Z","updated_at":"2024-06-20T17:48:06.765Z","dependencies_parsed_at":"2022-09-10T04:24:19.577Z","dependency_job_id":null,"html_url":"https://github.com/namreg/bbgo","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/namreg/bbgo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/namreg%2Fbbgo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/namreg%2Fbbgo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/namreg%2Fbbgo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/namreg%2Fbbgo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/namreg","download_url":"https://codeload.github.com/namreg/bbgo/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/namreg%2Fbbgo/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28326144,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-11T22:11:01.104Z","status":"ssl_error","status_checked_at":"2026-01-11T22:10:58.990Z","response_time":60,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bbcode","bbcode-parser","go"],"created_at":"2026-01-11T22:42:53.802Z","updated_at":"2026-01-11T22:42:54.362Z","avatar_url":"https://github.com/namreg.png","language":"Go","readme":"# bbgo \n[![Build Status](https://travis-ci.org/namreg/bbgo.svg?branch=master)](https://travis-ci.org/namreg/bbgo)\n[![Go Report Card](https://goreportcard.com/badge/github.com/namreg/bbgo)](https://goreportcard.com/report/github.com/namreg/bbgo)\n[![GitHub](https://img.shields.io/github/license/mashape/apistatus.svg)](https://github.com/namreg/bbgo/blob/master/LICENSE)\n\nBBGO is a fast [bbcode](https://en.wikipedia.org/wiki/BBCode) compiler for Go with supporting custom tags.\n\n## Usage\n\n```go\nbbg := bbgo.New()\nfmt.Println(bbg.Parse(\"[b]Hello World[/b]\"))\n\n// Output:\n// \u003cb\u003eHello World\u003c/b\u003e\n```\n\n## Supported BBCode Syntax\n```\n[tag]basic tag[/tag]\n[tag1][tag2]nested tags[/tag2][/tag1]\n\n[tag=value]tag with value[/tag]\n[tag arg=value]tag with named argument[/tag]\n[tag=\"quote value\"]tag with quoted value[/tag]\n\n[tag=value foo=\"hello world\" bar=baz]multiple tag arguments[/tag]\n```\n\n## Default Tags\n * `[b]text[/b]` --\u003e `\u003cb\u003etext\u003c/b\u003e` (b, i, u, and s all map the same)\n * `[url]link[/url]` --\u003e `\u003ca href=\"link\"\u003elink\u003c/a\u003e`\n * `[url=link]text[/url]` --\u003e `\u003ca href=\"link\"\u003etext\u003c/a\u003e`\n * `[img]link[/img]` --\u003e `\u003cimg src=\"link\"\u003e`\n * `[img=link]alt[/img]` --\u003e `\u003cimg alt=\"alt\" title=\"alt\" src=\"link\"\u003e`\n * `[color=red]text[/color]` --\u003e `\u003cspan style=\"color: red;\"\u003etext\u003c/span\u003e`\n * `[quote]text[/quote]` --\u003e `\u003cblockquote\u003e\u003ccite\u003eQuote\u003c/cite\u003etext\u003c/blockquote\u003e`\n * `[quote=Somebody]text[/quote]` --\u003e `\u003cblockquote\u003e\u003ccite\u003eSomebody said:\u003c/cite\u003etext\u003c/blockquote\u003e`\n * `[quote name=Somebody]text[/quote]` --\u003e `\u003cblockquote\u003e\u003ccite\u003eSomebody said:\u003c/cite\u003etext\u003c/blockquote\u003e`\n * `[code][b]anything[/b][/code]` --\u003e `\u003cpre\u003e[b]anything[/b]\u003c/pre\u003e`\n * `[list][*] item 1[*] item 2[*] item 3[/list]` --\u003e `\u003cul\u003e\u003cli\u003e item 1\u003c/li\u003e\u003cli\u003e item 2\u003c/li\u003e\u003cli\u003e item 3\u003c/li\u003e\u003c/ul\u003e`\n\n## Adding Custom Tags\n```go\nbbg.RegisterTag(\"color\", bbgo.Processor(func(ctx *context.Context, tag node.Tag, w io.Writer) {\n    switch t := tag.(type) {\n\tcase *node.OpeningTag:\n        // write here logic for opening tag\n    case *node.ClosingTag:\n        // write here logic for opening tag\n    case *node.SelfClosingTag:\n        // write here logic for self-closing tag\n\t}\n}))\n```\nThe default tags can also be modified by calling `bbg.RegisterTag`:\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnamreg%2Fbbgo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnamreg%2Fbbgo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnamreg%2Fbbgo/lists"}