Scott Lawrence (jerronimo) wrote in lj_clients,
Scott Lawrence
jerronimo
lj_clients

I'm working on a wiki-like markup so that people who are posting using my client (JLJ) dont have to care about getting lj tags right. It just occurred to me that a lot of this might be nice to have across all of the clients, or perhaps as a markup processor within the server. (I've not done any hacking on the goat, only clients, so I wouldn't even know where to start, although I imagine that the hooks for it would be someplace close to the "preformatted" processing.

This is basically the list of tags, borrowed mostly from standards used in WikiWebs and such;

First, some notes.
- If a tag is opened on one line, but not closed on that line, it is closed for you. That is to say, that if you start text as bold, on line 3, no matter what you do, the text on line 4 will start out as not bold.
- any of the escape characters, if doubled up, get escaped.. that is to say that ~this text will be italic~ however ~~this text will be surrounded by tildes~~

=== text formatting:
*bold*               <b>bold</b>
**not bold**         *not bold*
_underline_          <u>underline</u>
~italic~             <i>italic</i>
^blue text^          <font color="blue">text</font>

=== misc html:
-----                <hr>  (five dashes)
* foo                (bulleted list items <ul>, etc)
** bar               (same thing, but one level deeper)

=== links:   first the URL, then any text to include in the link

%http... foo%        <a href="http...">foo</a>
%ftp... foo%         <a href="ftp...">foo</a>
%foo@... foo%        <a href="mailto:foo@...">foo</a>
%img:http...%        <img src="http...">

=== livejournal specific things:
%user:foo%           <lj user="foo">
%post:8673 foo%      <a href="http://www.livejour...=8673">foo</a>
-8<- frag            <lj-cut text="frag">

Obviously, there are still some issues to be worked out, but this is the standard that I'm going to be coding to. Even if no one else supports it, it should be easy to implement in my client as a series of regex'es, but obviously, I'd like for there to be some kind of standard if others of you have already implemented something like this or were thinking of doing something like this in your clients...
Subscribe
  • Post a new comment

    Error

    Comments allowed for members only

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

  • 12 comments