[Snowy] bitenuker: Apologies to the Franco-Dutch
- From: Brad Taylor <brad getcoded net>
- To: snowy-list gnome org
- Subject: [Snowy] bitenuker: Apologies to the Franco-Dutch
- Date: Thu, 11 Nov 2010 09:35:16 -0500
Hey,
I just pushed bitenuker, a proof-of-concept, prototype, alpha, work-in-progress Tomboy Markdown parser/scanner/converter written in Javascript which outputs HTML (and eventually Note XML) to github.
The parser is recursive; when it hits the beginning of a tag — for instance, a triple apostrophe — it recurses down to find the ending tag, and then encloses that in the given HTML or XML tag. If the matching pair isn't found, it just inserts it as text. It is also guaranteed to have at most 2 lookbehind and 1 lookahead, so it maintains O(N) runtime. This should be orders of magnitude faster than traditional regex parsers, but of course, I don't have actual data to back that, it's not yet complete, and it hasn't had any performance tuning, so I could be feeding you a sandwich made of lies for all I know. It's a tasty sandwich though.
In the immediate future, I plan to refactor the code to eliminate the code duplication, add an IOutputStream interface and IHTMLOutputStream/INoteOutputStream classes, finish bullet support for - and +, and add a butt-load of unit tests. I'll be out in CA for a wedding this weekend, so I won't get to this until Monday or Tuesday. In the meantime, feel free to poke at the code
I'm hoping this marks the start of today's Reganing.
Best,
-Brad
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]