News for hackers. Stuff that matters.
Re:Show HN: My WWDC-inspired project. A Markdown editor for ... by xentronium on Monday August 08, 2011 @07:52AM (#2859708)
> I wanted to switch over to a parser-based implementation, but at the time all the existing parsers were setup to emit HTML, so getting character-offsets out of the parser wasn't possible without hacking the parser to death.

You might want to try libupskirt [1], library github uses.

[1] http://fossil.instinctive.eu/libupskirt/index

Re:Show HN: My WWDC-inspired project. A Markdown editor for ... by bodhi on Tuesday August 09, 2011 @06:32AM (#2863528)
Cool, thanks. I haven't looked deeply into it, but from a quick glance it seems to want to transform the input.

For my use case I need a parse tree, with specific byte (well, character really) offsets. For example, I need to know where the link started, not that there is now a a link with text T and href H.

My program (and Macchiato I assume) doesn't actually transform the source to an output format, we add attributes to the source text (similar to RTF).