Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
dec8b15
BBCode writer
reptee Oct 9, 2025
1966991
BBCode writer: revert README.md
reptee Oct 28, 2025
8b0ed0d
BBCode writer: dedupe templates
reptee Oct 28, 2025
15e0d2e
BBCode writer: remove renderBulletListSteam
reptee Oct 28, 2025
7fa660d
BBCode writer: omit empty blocks when rendering block list
reptee Oct 28, 2025
08a201d
BBCode writer: hubzilla lists changes
reptee Oct 28, 2025
850afab
BBCode writer: improve link handling
reptee Oct 28, 2025
2d882d5
BBCode writer: clamp heading levels
reptee Oct 28, 2025
6ae61f4
BBCode writer: add unit tests, remove golden tests
reptee Oct 28, 2025
3abe68b
BBCode writer: rename and export writers
reptee Oct 30, 2025
4e151d1
BBCode writer: remove dead code
reptee Oct 30, 2025
b253e2f
BBCode writer: take wrapSpanDivGeneric apart
reptee Oct 30, 2025
d802b61
BBCode writer: xenForo support
reptee Oct 30, 2025
2f8164a
BBCode writer: second bbcode (steam) -> bbcode (hubzilla)
reptee Oct 30, 2025
5541214
BBCode writer: adjust tests
reptee Oct 30, 2025
4181464
BBCode writer: xenForo images
reptee Oct 30, 2025
3079464
BBCode writer: replace table with "(TABLE)" when unsupported
reptee Oct 30, 2025
40ba7ce
BBCode writer: coherent blanklines between blocks
reptee Oct 30, 2025
0c7a7d6
BBCode writer: render table caption
reptee Oct 30, 2025
d031f24
BBCode writer: formatting
reptee Oct 30, 2025
1804afd
BBCode writer: wrapSpanDiv docs
reptee Nov 1, 2025
6875ab7
BBCode writer: drop MultiWayIf
reptee Nov 1, 2025
69e6c33
BBCode writer: always render captions
reptee Nov 1, 2025
2c4e976
BBCode writer: define clamp locally
reptee Nov 1, 2025
a6e60b6
BBCode writer: add module description
reptee Nov 4, 2025
fba351d
BBCode writer: escape @ in haddock block
reptee Nov 4, 2025
31a8ed4
BBCode writer: bbcode_xenforo template
reptee Nov 5, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions MANUAL.txt
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,12 @@ header when requesting a document from a URL:
- `asciidoc` (modern [AsciiDoc] as interpreted by [AsciiDoctor])
- `asciidoc_legacy` ([AsciiDoc] as interpreted by [`asciidoc-py`]).
- `asciidoctor` (deprecated synonym for `asciidoc`)
- `bbcode` [BBCode]
- `bbcode_fluxbb` [BBCode (FluxBB)]
- `bbcode_phpbb` [BBCode (phpBB)]
- `bbcode_steam` [BBCode (Hubzilla)]
- `bbcode_hubzilla` [BBCode (Hubzilla)]
- `bbcode_xenforo` [BBCode (xenForo)]
- `beamer` ([LaTeX beamer][`beamer`] slide show)
- `bibtex` ([BibTeX] bibliography)
- `biblatex` ([BibLaTeX] bibliography)
Expand Down Expand Up @@ -546,6 +552,12 @@ header when requesting a document from a URL:
[EndNote XML bibliography]: https://support.clarivate.com/Endnote/s/article/EndNote-XML-Document-Type-Definition
[typst]: https://typst.app
[mdoc]: https://mandoc.bsd.lv/man/mdoc.7.html
[BBCode]: https://www.bbcode.org/reference.php
[BBCode (FluxBB)]: https://web.archive.org/web/20210623155046/https://fluxbb.org/forums/help.php#bbcode
[BBCode (Hubzilla)]: https://hubzilla.org/help/member/bbcode
[BBCode (Steam)]: https://steamcommunity.com/comment/ForumTopic/formattinghelp
[BBCode (phpBB)]: https://www.phpbb.com/community/help/bbcode
[BBCode (xenForo)]: https://www.xenfocus.com/community/help/bb-codes/

## Reader options {.options}

Expand Down
1 change: 1 addition & 0 deletions data/templates/default.bbcode
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
$body$
5 changes: 5 additions & 0 deletions pandoc.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ data-files:
data/templates/font-settings.latex
data/templates/after-header-includes.latex
data/templates/default.vimdoc
data/templates/default.bbcode

-- translations
data/translations/*.yaml
Expand Down Expand Up @@ -342,6 +343,7 @@ extra-source-files:
test/tables.fb2
test/tables.muse
test/tables.vimdoc
test/tables.bbcode
test/tables.xwiki
test/tables/*.html4
test/tables/*.html5
Expand Down Expand Up @@ -389,6 +391,7 @@ extra-source-files:
test/writer.xwiki
test/writer.muse
test/writer.vimdoc
test/writer.bbcode
test/ansi-test.ansi
test/writers-lang-and-dir.latex
test/writers-lang-and-dir.context
Expand Down Expand Up @@ -666,6 +669,7 @@ library
Text.Pandoc.Writers.BibTeX,
Text.Pandoc.Writers.ANSI,
Text.Pandoc.Writers.Vimdoc,
Text.Pandoc.Writers.BBCode,
Text.Pandoc.PDF,
Text.Pandoc.UTF8,
Text.Pandoc.Scripting,
Expand Down Expand Up @@ -881,6 +885,7 @@ test-suite test-pandoc
Tests.Writers.OOXML
Tests.Writers.Ms
Tests.Writers.AnnotatedTable
Tests.Writers.BBCode

benchmark benchmark-pandoc
import: common-executable
Expand Down
5 changes: 5 additions & 0 deletions src/Text/Pandoc/Templates.hs
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,11 @@ getDefaultTemplate format = do
"markdown_phpextra" -> getDefaultTemplate "markdown"
"gfm" -> getDefaultTemplate "commonmark"
"commonmark_x" -> getDefaultTemplate "commonmark"
"bbcode_phpbb" -> getDefaultTemplate "bbcode"
"bbcode_fluxbb" -> getDefaultTemplate "bbcode"
"bbcode_steam" -> getDefaultTemplate "bbcode"
"bbcode_hubzilla" -> getDefaultTemplate "bbcode"
"bbcode_xenforo" -> getDefaultTemplate "bbcode"
_ -> do
let fname = "templates" </> "default" <.> T.unpack format
readDataFile fname >>= toTextM fname
Expand Down
20 changes: 20 additions & 0 deletions src/Text/Pandoc/Writers.hs
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,12 @@ module Text.Pandoc.Writers
, writeXWiki
, writeZimWiki
, writeVimdoc
, writeBBCode
, writeBBCodeSteam
, writeBBCodeFluxBB
, writeBBCodePhpBB
, writeBBCodeHubzilla
, writeBBCodeXenforo
, getWriter
) where

Expand Down Expand Up @@ -134,6 +140,14 @@ import Text.Pandoc.Writers.XML
import Text.Pandoc.Writers.XWiki
import Text.Pandoc.Writers.ZimWiki
import Text.Pandoc.Writers.Vimdoc
import Text.Pandoc.Writers.BBCode (
writeBBCode,
writeBBCodeFluxBB,
writeBBCodeHubzilla,
writeBBCodePhpBB,
writeBBCodeSteam,
writeBBCodeXenforo,
)

data Writer m = TextWriter (WriterOptions -> Pandoc -> m Text)
| ByteStringWriter (WriterOptions -> Pandoc -> m BL.ByteString)
Expand Down Expand Up @@ -209,6 +223,12 @@ writers = [
,("ansi" , TextWriter writeANSI)
,("xml" , TextWriter writeXML)
,("vimdoc" , TextWriter writeVimdoc)
,("bbcode" , TextWriter writeBBCode)
,("bbcode_steam" , TextWriter writeBBCodeSteam)
,("bbcode_phpbb" , TextWriter writeBBCodePhpBB)
,("bbcode_fluxbb", TextWriter writeBBCodeFluxBB)
,("bbcode_hubzilla" , TextWriter writeBBCodeHubzilla)
,("bbcode_xenforo" , TextWriter writeBBCodeXenforo)
]

-- | Retrieve writer, extensions based on formatSpec (format+extensions).
Expand Down
Loading