Skip to content

v1.0.3 quick tweaks

Choose a tag to compare

@JamesM92 JamesM92 released this 02 May 04:53
· 25 commits to main since this release

Micron2HTML v1.0.3

A small follow-up to v1.0.2's MeshChat parity pass — one bug fix and one rename.

Breaking change

The bundled stylesheet is now named micron-meshchat.css (previously micron.css). The new filename makes the design intent obvious: this is the stylesheet that matches Reticulum MeshChat's rendering, and a future non-parity variant could land alongside it without confusion.

If you link the file by name in your HTML, update the path:

<!-- Before -->
<link rel="stylesheet" href="/static/micron.css">

<!-- After -->
<link rel="stylesheet" href="/static/micron-meshchat.css">

The bundled location inside the package also changed:

micron2html/micron.css           ← gone
micron2html/micron-meshchat.css  ← new name

The from micron2html.cli import _bundled_css helper resolves the new path automatically — no code change needed if you load the CSS through the API.

Fixes

Multi-field link specs no longer silently drop fields

NomadNet's link syntax lets a single link carry several key=value pairs, separated by backticks:

`[Submit form`/page/handler.mu`username=alice`agree=yes`age=42]

When this link is clicked, every key/value should be POSTed to the server (and from there reach the executable .mu page as var_username, var_agree, var_age). Earlier versions of Micron2HTML rendered the link like this:

<!-- v1.0.2 and earlier — only the first key/value was kept -->
<a href="/page/handler.mu" class="mu-link" data-field-spec="username=alice">Submit form</a>

agree=yes and age=42 were silently discarded — the renderer split the link inner on backticks but only captured parts[2], dropping everything after. Forms that depended on more than one field appeared to "swallow" the rest of the user's input.

v1.0.3 captures the full backtick-separated spec:

<!-- v1.0.3 — every key/value reaches the handler -->
<a href="/page/handler.mu" class="mu-link" data-field-spec="username=alice`agree=yes`age=42">Submit form</a>

The consuming code (your form-submit JS, NomadPortal's link click handler, etc.) now sees the complete list of fields and can submit each as its own POST value. Single-field links — the common case — are byte-identical to v1.0.2; this change only affects links with two or more key=value pairs.

Two regression tests added to lock the behaviour in (test_link_single_field_spec confirms the unchanged single-field case, test_link_multi_field_spec_preserves_all exercises the multi-field case).

Compatibility

  • Python: 3.9+
  • API: 100% backwards-compatible (no signature changes, no class renames)
  • Output HTML: byte-identical to v1.0.2 for every input that was already being rendered correctly. Only multi-field links — which previously rendered with missing data — change shape.

Install

pip install --upgrade git+https://github.com/JamesM92/Micron2HTML.git@v1.0.3

Full changelog

See CHANGELOG.md — v1.0.3 covers two commits since v1.0.2.