bbcode changelog
Every bbcode release, newest first.
Versions
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.