Relationships
#1831 Data Tutorial copy cmd only copies half of data query
Opened by funsaized · 8/26/2026· Shipped 8/27/2026
Bug: On https://swamp-club.com/manual/tutorials/working-with-data, the copyable command $ swamp data query 'tags.type == "resource"' copies only swamp data query 'tags.type == \ when you click the block / COPY affordance.
Cause: .copy-cmd copies data-cmd via getAttribute. The attribute is emitted as data-cmd="... "resource" ...". HTML does not treat " as an escape, so the attribute is truncated at the first inner ", and resource"' becomes a stray boolean attribute. Visible text in the
is complete; only copy is wrong.Repro: Open that tutorial, hover the query command until COPY appears, click, paste. Other commands on the page copy in full.
Fix: Emit " (or copy pre.textContent with the $ stripped). Add a test for nested double quotes.
Shipped
Click a lifecycle step above to view its details.
funsaized commented 8/26/2026, 9:17:24 AM
shoot I made a feature not a bug..
stack72 commented 8/27/2026, 12:59:06 AM
Thanks @funsaized for reporting this! The fix has been merged and a release is on its way. We appreciate your contribution to swamp.
Sign in to post a ripple.