Commit Graph
7 Commits
Author SHA1 Message Date
dualfroz edc0d7ff06 Describe this repository 2026-10-22 21:07:42 +02:00
dualfroz af172f8665 fix: keep non-breaking spaces in text
Since the `u` flag was added to the whitespace regex in TextConverter
(7f03acf), `\s` also matches U+00A0, so ` ` and literal non-breaking
spaces were turned into regular spaces. Leave U+00A0 out of the collapse.

EmphasisConverter used trim(), which does not strip U+00A0, so a
non-breaking space at the edge of <em>/<strong> would now end up inside
the delimiters (`**Total:&nbsp;**`), where it stops them from flanking the
text. Strip it there too; like before, it becomes a regular space outside
the delimiters.

Fixes #258
2026-10-03 02:31:49 +02:00
dualfroz 94062cea69 fix: use autolinks for URLs that contain an ampersand
The link text goes through TextConverter, which escapes `&` to `&amp;`,
while the href is the decoded attribute value, so `$href === $text` never
held for a URL with a query string like `?a=1&b=2`. Undo that escaping
before comparing. Only `&amp;` is undone: `<` and `>` cannot appear in an
autolink, so those links keep the inline form.

Fixes #248
2026-10-03 02:27:25 +02:00
dualfroz 1bb05d0606 fix: separate block elements from the inline content before them
An image or link right before a heading or paragraph ended up on the
same line, e.g. `![](a.png)### A`.

Fixes #259
2026-10-02 16:19:40 +02:00
dualfroz 806387f3f6 fix: strip the newline right after the <pre> start tag
Fixes #244
2026-10-02 16:19:40 +02:00
dualfroz f194c36ae3 fix: honor start="0" on ordered lists (#277) 2026-09-07 09:42:24 -04:00
dualfroz 19b1be8421 fix: honor start="0" on ordered lists
The ordered-list numbering used intval() on the "start" attribute inside a
truthiness check, so a valid start="0" was treated as absent and the list
restarted numbering at 1. Detect an explicit numeric start attribute with
is_numeric() instead, so <ol start=\"0\"> renders as 0. 1. ...
2026-09-04 09:09:23 +02:00