News for hackers. Stuff that matters.
Re:Show HN: Jq-Like Tool for Markdown by saghm on Sunday February 23, 2025 @05:21PM (#43153777)
I've never had a need for parsing markdown like this, bit I have to wonder, would it make to go through HTML instead, given that it's what markdown is designed to compile to? At that point, I'd assume there's any number of existing XML tools that work work, and my (maybe naive) assumption is that typical markdown documents would be relatively flat compared to how deeply nested "native" HTML/XML often gets, so it doesn't seem like most queries would require particularly complex XPath to be able to specify.
Re:Show HN: Jq-Like Tool for Markdown by MathMonkeyMan on Sunday February 23, 2025 @06:37PM (#43154302)
I did this for a tool that checks relative links in markdown files, e.g. readmes in a repo.

markdown -> xhtml -> sxml -> logic (racket)