www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.announce - Re: New web newsreader - requesting participation

References: <ii592i$c09$1 digitalmars.com> <ii62n0$1r3i$1 digitalmars.com> 
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

foobar <foo bar.com> wrote:
 I'd implement the following filters/parsers for text posts: 2. parse

Well, let's hope this works! I'm now making a post from the new newsreader using BBCode. Testing a lot of new code at once here, so I hope I'm not accidentally spamming... The bbcode parser understands b, i, u, quote, code, and an extension of mine, section. I can add more later. The way it works is: a) Existing posts go from plain text -> HTML -> BBCode. This final bbcode result populates the message section. b) BBCode, if checked, is then converted back to plain text and commited to the database, and the news server. c) The plain text is what's stored. It's treated the same way as any other message in the system - viewable as original text, or viewable as parsed HTML. To avoid throwing away the semantic meaning of the BBCode tags, it may add some extra text. For example, bbcode's code blocks get some brief D style comments before and after it - this looks pretty reasonable in plain text, and is unambigious to the text parser. For example: /* **************** */ some D code goes here /* **************** */ Note the specifics are subject to change as I continue to improve things. Anyway, here goes nothing....
Feb 06 2011