Skip to content

clojure.xml/parse: vector :content, joined text runs - #5

Merged
yogthos merged 2 commits into
mainfrom
fix/content-vector
Nov 10, 2026
Merged

yogthos merged 2 commits into
mainfrom
fix/content-vector

Conversation

@yogthos

@yogthos yogthos commented Nov 9, 2026

Copy link
Copy Markdown
Member

JVM clojure.xml builds :content with conj onto [], so non-empty content is a vector and an empty element has nil. The shim returned a seq, which breaks code that indexes into it or checks vector?.

It also pushed every CHARACTERS event as a separate string, so text split around an entity or a CDATA section (t<![CDATA[x]]>u) came back in pieces where clojure.xml gives one string. Adjacent pieces are joined now; whitespace-only runs are still dropped.

README test commands said joltc; it's jolt.

JVM clojure.xml conjes content onto [], so a non-empty :content is a vector
and an empty element's is nil; the shim returned a seq. It also pushed each
CHARACTERS event as its own string, so text split around an entity or a
CDATA section came back in pieces. Adjacent pieces are joined now, and a
whitespace-only run is dropped as before.
@yogthos
yogthos merged commit 28c3744 into main Nov 10, 2026
2 checks passed
@yogthos
yogthos deleted the fix/content-vector branch November 10, 2026 01:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant