Repository navigation
WackoWiki 6.3.2
This release focuses on a substantial rework of the code syntax (inline code and code blocks), a set of formatter and paragraphing fixes, installer/setup hardening, and a major overhaul of the build and release tooling (JavaScript bundling and theme CSS minification).
WACKO_VERSIONhas been raised to 6.3.2.- Inline code and code block delimiters are now maximal runs instead of fixed-length pairs.
- Inline code content is now literal (no wiki markup inside).
- Deprecated centered-text syntax (
>>…<<) and the legacy alignment syntax have been removed. - The release builder now produces minified JS and theme CSS bundles with a SHA-256/SRI manifest, and asset builds are opt-in.
New code syntax
Inline code ##…##
- The delimiter is a maximal run of
#(N ≥ 2). The closing run must be a maximal run of exactly the same length; runs with fewer#are ordinary content. - The content of an inline code span is now literal: no HTML, links, actions or typography are applied. It is HTML-escaped and protected against the typography stage.
- A literal
##inside a span requires a longer delimiter:### ## code ## ###renders as<code>## code ##</code>#### code ####is a span with a four-hash delimiter, not an escaped##.
- The pre-save pass uses the same rules, so macros inside a code span are no longer resolved when the page is saved.
- Compatibility: the deprecated behaviour can be restored with
db->legacy_inline_code = true;(default isfalse). The flag and its deprecated branch will be removed at the end of the deprecation phase.
Code blocks %%…%%
- The fence length is the delimiter: a block is closed by a run of exactly the same length, while runs of any other length are ordinary content (the "own escape" rule of Markdown backtick strings, extended to code blocks).
- A top-level block is opened by a run of at least the base length; longer runs must be alone on their line, so ordinary text can neither open nor close a block.
- The nested block rule (k+1) is unchanged.
- Backticks are supported as an alternative block fence with identical behaviour.
Example — the inner %% is shown as typed:
%%%
%%(hl css wrapper=shade)
.d2 { font-size: 70% }
%%
%%%
Syntax highlighting and WikiEdit
- The highlighter follows the same maximal-run rules; protected regions now use NUL-delimited placeholders.
- The
codeandsourcetoolbar buttons call the newinsCode()/insCodeBlock()helpers. - Delimiter removal is derived from the document using the same scanner rules as the highlighter and the syntax converter, so
###,%%%and longer delimiters can be removed again. MarkUp(),unindent()andinsBlockWrapper()skip lines belonging to an inline code span or a code block.
Markdown ⇄ WackoWiki conversion
- Inline code and code block handling now matches the current formatter semantics.
- A code span never crosses a line break; its content is copied verbatim into the Markdown code span.
- Protected regions (table, code block, inline code, literal text) are extracted in source order, so the region that starts first wins (
""##x##""stays literal,##""x""##is an inline code span). - Markdown fences are only recognised at the start of a line, as in CommonMark; a fence inside a line is an inline code span.
- Delimiters are extended when the content contains
#,%or backtick runs. - Highlight options of the opening fence are reduced to the language;
wrapper=…has no Markdown equivalent and is dropped.
Formatter and paragraphing fixes
- Forced line breaks (
---) no longer consume the following newline and indentation, so headings and lists after a line break are parsed again instead of being rendered as plain paragraphs. - Auto-paragraphs now terminate the current region before closing block-level tags as well as after starting one, so
<p>and<div>tags stay balanced for indented quotes and code blocks. - Blockquote nesting is preserved during paragraphing; blank lines inside indented multi-line quotes no longer insert
<p class="auto">elements. - Indented blockquotes are parsed in an isolated indentation scope — quoted newlines and forced breaks can no longer close outer indents. Complete blockquotes are excluded from paragraph rewriting so intentional blank lines survive.
- Tables stay inside their containing list item; table-source indentation no longer modifies the outer list stack or emits stray
</li></ul>between the table opening tag and its rows. - Raw HTML
<#…#>is now matched inPRE_REGEXahead of the""alternative: empty attributes such asclass=""are no longer broken, and block HTML is neither re-parsed as wiki markup (--notypo--no longer becomes strikethrough) nor swallowed by auto-paragraphs. <figure>is escaped against auto paragraphs.- Heading detection was tightened: the opening
=delimiter must be a maximal run of 2–7 characters (3–7 inextract_sections()), and the closing delimiter must be a maximal run of at least two=at the end of the line (its length may differ from the opening one). A line consisting only of=is no longer treated as a heading. - Minor fix for H6.
Rendering and links
- Local images as link labels:
file:paths inside links are now rendered with the existing file handler, matching the behaviour of remote image URLs. Global and page-local files are supported while link targets, sizing, alignment and access checks are preserved; missing files remain visible as literalfile:text.((/PageName file:image.png))((/PageName file:image.png?300&right))
base_urlis only matched at the beginning of a URL.utf8_ucwords()only capitalises tag segments with two or more space-separated words:user1staysuser1,hello worldbecomesHello World.
Installer and setup fixes
- Database driver switching works again under the application CSP. The installer previously relied on inline
onclickhandlers, which are blocked byscript-src-elem/script-src-attr, so selecting SQLite never reached the server and the MySQL section was rendered instead.- All installer JavaScript moved into the new external file
setup/js/installer.js, using delegateddata-actionhandling (reload/back), auto-submit for radio buttons carryingdata-submit-action, and client-side form validation. - Validation messages and the minimum password length are passed to the scripts via
data-*attributes on the forms. - Inline
<script>blocks andonclickhandlers were removed fromconfig-database.php,config-site.php,lang.php,version-check.php,install-database.phpandinstall_guard()incommon.php. - No server-side changes are required: posting
config[db_driver]=sqlitenow works as intended.
- All installer JavaScript moved into the new external file
- XSS/SQLi escaping fixes in the setup, together with SQLite migration and FTS5 fixes.
- The installer now reports the failure after the database checks instead of silently stalling.
- The logo file inspection (
get_image_dimensions(),filesize(),sha1_file()) is now scoped to fresh installations only. During upgrades, a configuredsite_logothat no longer exists inUPLOAD_GLOBAL_DIRno longer produces a misleading warning — the logo record was only ever inserted for fresh installs anyway.
Build and release tooling
JavaScript bundling
- The WikiEdit JavaScript is now assembled with esbuild instead of being copied verbatim:
src/js/editor/**(except the toolbar customizer) is compiled into the WikiEdit bundle; the toolbar customizer keeps its folder and gets its own bundle, with its original filename preserved (only the content is minified).- The WikiEdit-only helpers
utils/{logger,storage,time}.jsare bundled as well and are no longer shipped as separate files; they moved tosrc/js/editor/utils/to make the "everything undereditor/belongs to WikiEdit" rule explicit. components/,core/andutils/clipboard.jsare minified in place, keeping their file names and paths, so all existing references keep working.lang/is minified;external/(third party) is copied 1:1, untouched.
- New
build.mjsoptions:--js/--out/--manifest/--commit/--keep/--strict. - A JSON manifest is written with size, SHA-256 and SRI hash per shipped file for cache busting and the integrity attribute.
- The bundler checks that the WikiEdit bundle contains nothing but
editor/code and that no shipped file imports something that is no longer shipped. build-release.shbuilds the JavaScript from the exported Git tree instead of the working copy, so a release always ships the bundle of the commit it was built from. The build runs before the Composer install to fail fast and cleans up afterwards. New options:--js,--strict-js,--js-source-maps.
Theme CSS minification
- The theme is built from
src/themevia the new--theme=/--theme-out=options; all other theme files (php,tpl,xsl,md) are copied 1:1. - All CSS files are minified — CSS inside the JS tree as well as the complete theme tree — always keeping the original path and filename.
- A rescue pass ships bundled helpers (e.g.
utils/storage.js) again as static assets when a shipped file imports them. - CSS diagnostics: unbalanced braces are reported with the exact source line and nesting depth, and a broken CSS file no longer aborts the build (the original file is copied instead).
- Theme files are included in the manifest (size, SHA-256, SRI).
- Raw sources can be written to
_sources/with--with-sources, so they can no longer overwrite the built files. - The builder refuses a theme output folder that would delete the theme or the JS source tree.
build-release.shinstalls the built theme back into the release tree at the same relative path, rewrites the manifest keys to the release layout (src/theme/...), adds--theme, verifies that the standalone script keeps its name, and reports how many theme CSS files were minified.
Release builder
- Asset builds are opt-in:
--js/--theme, andBUILD_JS/BUILD_THEMEdefault tofalse. - An interactive prompt — "Build and minimize JavaScript assets and CSS? [y/N]" — is offered in all version-selection paths (MASTER, latest tag, explicit version). Help text, examples and the configuration summary were updated accordingly, and the warning messages when the asset build is skipped were adjusted. Releases therefore no longer require Node.js/esbuild by default.
- The release builder was hardened and VERSION was split from SOURCE:
--versionnames the archive,--sourceselects the Git code to build, so a version string no longer silently selects HEAD of the current branch.- New options:
--source,--branch,--name,--no-zip. - Refs are resolved via fully qualified names (tag > branch > remote > commit hash).
- Build output is streamed to
build/build.logwith ANSI stripping and safeEXIT/INT/TERMtraps. composer.json/composer.lockare copied from the selected source, never from HEAD.tar.gzis the primary artifact;zipis optional and non-fatal.- Added a disk space check and source validation before building.
- New options:
Other fixes and cleanups
- Section-edit redirect for comments now points directly at the parent page with the section anchor (
#h{page_id}-{section}) instead of only the comment tag. The duplicated comment-page lookup was moved intoWacko::get_comment_page()and is shared by the show and edit handlers. help=1no longer returns the hidden content help entry, so its own help text never shows up in the action list.- Added MIME icons for Markdown.
- The System info page now shows the GD and ImageMagick versions.
- Removed the obsolete
BINARYtag fromLIKEcomparisons — both sides were already wrapped inlower()and SQLite does not recogniseBINARYas aLIKEmodifier. - Removed support for the deprecated centred-text syntax
>>…<<and the legacy alignment syntax. - Updated message sets and minor fixes across the code base.
Upgrade notes
- Inline code is literal by default. Pages relying on links, actions or typography inside
##…##will render them literally. Setdb->legacy_inline_code = true;to keep the old behaviour during the deprecation phase. - Code delimiters are maximal runs. Code blocks containing
%%(or inline code containing##) need a longer fence to remain intact; existing pages with such content may need to be reviewed. - The deprecated centred-text syntax
>>…<<no longer renders and the legacy alignment syntax has been removed. - Release builders: asset builds are now opt-in. Use
--jsand/or--theme(or answer the interactive prompt) when minified JS/theme CSS are wanted; the default build no longer requires Node.js/esbuild. The--sourceoption should be used when building a release for a specific commit or branch.
Always empty your browser cache to not run your wiki with outdated WikiEdit files.
Ctrl+Shift+R
Full Changelog: 6.3.1...6.3.2