Skip to content
Contents

bbcode changelog

Every bbcode release, newest first.

  1. 0.4.0

    1 added

    Added

    • Template sections: {{#key}}...{{/key}} keeps its content when the field fills to something and drops it when the field is empty, so optional links and images don't leave [url=] or [img][/img] behind. A section on whole lines takes its line breaks with it. {{#a|b}}...{{/a|b}} keeps its content when either field fills. A section that can't resolve (its field undeclared or in error) stays as written and doesn't block the sections around it; an opening marker never closed is text. Line breaks may be LF or CRLF. templateFields counts section keys as used. A template body that already held {{#key}}...{{/key}} as text for a declared field now reads it as a section.
  2. 0.3.2

    1 fixed

    Fixed

    • An unclosed-tag fix no longer crosses the tags inside it. A tag open at the end of the text now closes after any tag it holds and after the fixes of tags open inside it ([b]x [code]a\nb[/code] becomes [b]x [code]a\nb[/code][/b], not [/b] inside the code). A one-line tag, or an inline raw tag like [img], gets no fix when a [ follows it on its line.
  3. 0.3.1

    1 added

    Added

    • unclosed-tag diagnostics carry a fix when the closing is obvious. A tag crossed by the close of the tag around it closes right before that close, or swaps with it when its own close comes right after ([b][i]x[/b][/i] becomes [b][i]x[/i][/b]). A one-line tag with no close after it closes at the end of its line. A tag still open at the end of the text closes at the end of its line (inline tags) or at the end of the text (block tags). No fix when a close exists on a later line.
  4. 0.3.0

    1 added

    Added

    • ./markdown: toMarkdown and fromMarkdown, with a lost report of what the other format can't say. Emphasis follows a simplified CommonMark, with no "rule of 3" for telling */_ delimiter runs apart. Typed BBCode written inside markdown passes through as is; fromMarkdown lints its own output afterward and reports any problem osu! would have with that BBCode as a no-equivalent loss instead of shipping it broken.
  5. 0.2.3

    1 changed, 1 fixed

    Changed

    • CI runs CodeQL and a gitleaks scan of the full git history, and Dependabot covers dependencies and pinned actions. Dependencies are on their latest versions.

    Fixed

    • Template date fields refuse days that don't exist, like 2026-02-31 or 2025-02-29. They used to pass because Date.parse rolls them over into the next month.
  6. 0.2.2

    1 added, 1 changed

    Added

    • OSU_WIDTHS (userpage 890, forum 750, beatmap 430) and OSU_FONT_SIZES (14, 14, 12): the column width and font size, in px, osu! shows BBCode at on desktop. A preview drawn at these and scaled to fit wraps lines and image rows where osu! does.

    Changed

    • styles.css spaces boxes as osu! does: the body sits 10px under the title, indented 20px, without the rule beside it, and the title's text lines up with the body.
  7. 0.2.1

    1 fixed

    Fixed

    • styles.css sets .bb-img to display: inline with baseline alignment, as osu! shows images. Under a reset that makes every img a block (Tailwind's preflight), images written side by side, like a collab row, stacked one under another.
  8. 0.2.0

    1 added, 1 changed, 4 fixed

    Added

    • LIMITS.nesting (100) and the too-deep lint warning for tags nested past it.

    Changed

    • An unclosed [box] or [spoilerbox] renders as a box that runs to the end of what holds it (the post, or the quote or box around it), as on osu!, instead of as text. lint reports it as an unclosed-tag warning, and the node's close is null.

    Fixed

    • Deeply nested tags no longer overflow the stack. A 60,000 character post of nested [quote], [box] or [list] tags, or boxes nested inside box titles, threw RangeError from render and lint in Node and Chromium. Tags nested past LIMITS.nesting (100) now stay text, and lint reports the new too-deep warning once.
    • validateImagemap (and so serializeImagemap) refuses [/imagemap] in the image URL, a link or a title. It ended the written block early, so osu! showed the imagemap as text.
    • Parsing, rendering and linting take linear time on hostile input. 60,000 characters of [box=, [c] with a close on a later line, [url] or unterminated [a= took up to 5 seconds in Node, so one post could stall a server rendering it. Close tags, newlines and box title ends are now found once per document.
    • A bare link followed by bracketed text (https://a.b[x]) leaves the brackets out, as osu! does.
  9. 0.1.0

    8 added

    Added

    • parse and serialize: osu! BBCode to a lossless tree with source ranges and back. Unclosed, unknown and malformed tags stay text, as on osu!.
    • render: safe HTML with bb- classes, osu!'s newline eating and automatic links, and an optional media proxy.
    • lint with eleven codes and fixes where obvious, applyFix, count, LIMITS, TAGS and findTag.
    • ./styles.css: a dark stylesheet for rendered output, with a light variant (bb--light).
    • ./helpers: color, normalizeColor, gradient (with its character cost), flag, profile, box, list and escapeBBCode.
    • ./imagemap: parseImagemap, validateImagemap, serializeImagemap and formatPercent.
    • ./flags: COUNTRIES (ISO 3166-1 alpha-2), findCountry, searchCountries, flagUrl and normalizeCountryCode.
    • ./template: fillTemplate, templateFields and FIELD_KINDS.