Mostly Grey former ginger with a preference for Rust. Leads wg-rustup, sorry about the mess. He/Him or They/Their Now @kinnison@fosstodon.org too

Manchester
Joined December 2008
Replying to @nuxeh
I would prefer an AST which was moderately easily returned to markdown, rather than one which is lower level (which I'd consider HTML to be) but not a bad idea if other options aren't useful inspiration enough, thanks.
1
1
Replying to @bcardiff
A brief glance suggests github.com/icyleaf/markd/bloโ€ฆ is the AST -- is that right? (While I said any language will do, Crystal and Ruby are not ones I'm yet familiar with navigating)
1
Replying to @robhague
Nice. There will be easier to use options (e.g. using serde and yaml-rust directly to convert from yaml to Rust structs) but if you care about provenance and reporting errors then you might find `marked-yaml` to be of use :D Issues and PRs *gratefully* received.
I've been directed toward mdast by someone in another place, but looking at those other impls sounds sensible too. Pandoc's AST is so far the most obvious thing to crib from.
1
The spec is definitely useful, though it doesn't really come out and say "this is the AST" it's more of a set of rules for identifying and parsing the components. AFAICT. Perhaps I missed an AST definition in my skim?
Replying to @robhague
I am working on a tool with a friend which consumes markdown as a semi-structured input format. In order to better report errors in the input, I want to be able to point at the line (and column perhaps) where the error exists.
1
1
Replying to @jmtd @rjek @pwaring
Not quite. I am putting together a provenanced Markdown AST and want to ensure that it's as nicely structured as it can be. Parsing Markdown is a total pig, but there're good libraries for that already.
1
Dear Lazyweb/Twitterverse, Do you have a favourite Markdown AST? I am already looking at Pandoc's AST for inspiration, but other examples would be useful. Any programming language is fine, I am capable of consuming ideas from most genres. Thanks, D.
5
1
2
For those interested, it's primary purpose is to allow you to report back to users when configuration values are bad etc, in a more effective way. Everyone loves provenanced errors.
2
This morning I released version 0.1.0 of `marked-yaml` which is a @rustlang library crate for a simplified YAML data structure which provides spans (or at least start marks) for all the data you parse out of YAML strings. crates.io/crates/marked-yaml
1
1
12
Replying to @kianryan
Presumably either there's some super-secret headers trainfares.co.uk need to add, or gmail needs to learn to cope with their emails.
Replying to @nick_r_cameron
So far you've not been recommending it, but in 4 days of Go, surely you have encountered something *positive* to say ?
2