bbcode changelog
Every bbcode release, newest first.
Versions
0.4.0
1 addedAdded
- 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.templateFieldscounts section keys as used. A template body that already held{{#key}}...{{/key}}as text for a declared field now reads it as a section.
- Template sections:
0.3.2
1 fixedFixed
- An
unclosed-tagfix 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.
- An
0.3.1
1 addedAdded
unclosed-tagdiagnostics 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.
0.3.0
1 addedAdded
./markdown:toMarkdownandfromMarkdown, with alostreport 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;fromMarkdownlints its own output afterward and reports any problem osu! would have with that BBCode as ano-equivalentloss instead of shipping it broken.
0.2.3
1 changed, 1 fixedChanged
- 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
datefields refuse days that don't exist, like 2026-02-31 or 2025-02-29. They used to pass becauseDate.parserolls them over into the next month.
0.2.2
1 added, 1 changedAdded
OSU_WIDTHS(userpage890,forum750,beatmap430) andOSU_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.cssspaces 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.
0.2.1
1 fixedFixed
styles.csssets.bb-imgtodisplay: inlinewith baseline alignment, as osu! shows images. Under a reset that makes everyimga block (Tailwind's preflight), images written side by side, like a collab row, stacked one under another.
0.2.0
1 added, 1 changed, 4 fixedAdded
LIMITS.nesting(100) and thetoo-deeplint 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.lintreports it as anunclosed-tagwarning, and the node'scloseisnull.
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, threwRangeErrorfromrenderandlintin Node and Chromium. Tags nested pastLIMITS.nesting(100) now stay text, andlintreports the newtoo-deepwarning once. validateImagemap(and soserializeImagemap) 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.
0.1.0
8 addedAdded
parseandserialize: osu! BBCode to a lossless tree with source ranges and back. Unclosed, unknown and malformed tags stay text, as on osu!.render: safe HTML withbb-classes, osu!'s newline eating and automatic links, and an optional media proxy.lintwith eleven codes and fixes where obvious,applyFix,count,LIMITS,TAGSandfindTag../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,listandescapeBBCode../imagemap:parseImagemap,validateImagemap,serializeImagemapandformatPercent../flags:COUNTRIES(ISO 3166-1 alpha-2),findCountry,searchCountries,flagUrlandnormalizeCountryCode../template:fillTemplate,templateFieldsandFIELD_KINDS.