Skip to content

Vault Publisher 0.1.5

Choose a tag to compare

@NoteNerdOfficial NoteNerdOfficial released this 08 Nov 08:26
· 17 commits to main since this release

A column that is one width everywhere, and a markdown pane wide enough for the file it is showing.

One token, one width

The theme token that sets the reading column, --osp-measure, was written in
ch. That unit is resolved against the font of the element that uses it, and
the measure is applied in eight places: the article, the properties row under
a note's title, the stats line, the mentions, the source pane, the generated
lists. Several of those are set in the UI font at 0.8125rem or 0.6875rem
rather than at the body size, so one number produced three different column
widths.

What you saw was a page that did not line up. The rule under a note's title
ended 133px short of the callout below it, and the stats line 110px short,
both of them written against the same token as the article they sit in.

Every theme's measure is now in rem, which is resolved against the root, so
each consumer lands on the same edge whatever type it is set in. The values
are each theme's old ch width resolved in that theme's own body font, so no
column moved by more than about a pixel and a half. The properties row loses
its copy of the measure outright: it is inside the article, which was already
holding the column, so the second constraint was never doing anything but
disagreeing with the first.

If you set --osp-measure in your own CSS, write it in rem. A ch will
still work on the article and will quietly disagree with itself everywhere
else. The examples in the README and in the settings panel now show a rem.

A markdown pane measured in its own columns

Markdown shows a note's source, and the source is monospace, but the pane
inherited the prose measure, which is counted in a proportional font. At the
reading width it held 77.2 columns against source lines of 78, so a vault
whose notes are hard wrapped had them soft wrapped a word short of their end.

That strands single words on their own line, and worse, it makes the file's
own line breaks impossible to tell from the viewport's, which is the one
thing a source view has to get right.

The pane now takes 80 columns of its own font, or the theme's measure where
that is wider. Wide and full still mean no limit. No width fits everything
and none is meant to, since a table or a long link runs past any of them, so
the block still wraps rather than scrolls sideways.

Worth knowing if your prose will not reflow

If you widen the column and the text keeps its old line breaks, the breaks
are in your notes rather than in the page. Obsidian renders a single newline
as a line break unless Settings, Editor, Strict line breaks is on, so a
vault hard wrapped at 76 columns publishes pages carrying every one of those
breaks as a <br>. Turn that setting on and the wrapping goes back to being
what it was meant to be, which is a convenience for your diffs.