New web newsreader - requesting participation
Adam D. Ruppe
destructionator at gmail.com
Sun Feb 6 17:25:58 PST 2011
References: <ii592i$c09$1 at digitalmars.com> <ii62n0$1r3i$1 at digitalmars.com>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
foobar <foo at bar.com> wrote:
> I'd implement the following filters/parsers for text posts: 2. parse
> BBCode.
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....
More information about the Digitalmars-d-announce
mailing list