Re: [Snowy] bitenuker: Apologies to the Franco-Dutch



Oh, almost forgot the link:


On Nov 11, 2010, at 9:35 AM, Brad Taylor wrote:

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]