Optionaloptions: legacy.BreakscapeOptionsConvert bitmark from bitmark to JSON, or JSON to bitmark (bpg-compatible).
Input detection order matches bpg: AST → JSON → assume bitmark. Default output: bitmark input → json; json/ast input → bitmark.
Optionaloptions: legacy.ConvertOptionsConvert between HTML tables and bitmark tables (bpg-compatible
convertHtmlTable).
Backed by the core's schema-driven html mapping: HTML input has each
<table> wrapped in the core's <bitmark-bit> envelope and parsed;
bits input is emitted as html and the <table> fragments extracted
(the envelope stripped). The markup inside <table> follows this
parser's html mapping, which may differ from bpg's in detail.
Optionaloptions: ConvertHtmlTableOptionsConvert bitmark text ↔ text AST (bpg-compatible convertText).
Direction is auto-detected: TextAst (JSON) input generates bitmark
text; anything else parses as bitmark text and returns the TextAst
(plain JS object; a string when jsonOptions.prettify is set).
Optionaloptions: ConvertTextOptionsCreate a bit-JSON pseudo-AST from bitmark or JSON input (PLAN-126 §3.1).
NOTE: the returned structure is the bit JSON (wrapper entries), not
bpg's internal TS AST node model. It round-trips through convert but
is not walkable with bpg's Ast/NodeType.
Optionaloptions: CreateAstOptionsExtract plain text from bitmark or bitmark JSON (bpg-compatible).
Optionaloptions: ExtractPlainTextOptionsNot supported: bpg-internal development tool.
Optional_options: unknownGet information about the bitmark language (bpg-compatible info).
Optionaloptions: legacy.InfoOptionsConvert a text AST to plain text (bpg-compatible textAstToPlainText).
Optional_options: ExtractPlainTextOptionsUnbreakscape text (bpg-compatible unbreakscapeText).
Optionaloptions: UnbreakscapeOptionsUpgrade (prettify / canonicalize) bitmark or JSON to the latest version
of itself (bpg-compatible upgrade).
Optionaloptions: UpgradeOptionsGet the version of the library.
Reports the @gmb/bitmark-parser version (not a bpg version string).
Breakscape text (bpg-compatible
breakscapeText).