Getting around div tags

Joseph Pearson joseph at make-believe.org
Wed Mar 17 23:07:34 EST 2004


Alternatively Fred, if you never use the MT "extended entry" field, you could just have that as the field for your "infobox" div, and save yourself from building HTML edifices everytime you write something.

Or you could use the "excerpt" field for this purpose as well.

- Joseph

John <gruber at fedora.net> wrote on 18/03/2004 at 2:58 PM:

J> Fred Condo <markdown at fredcondo.org> wrote on 03/17/04 at 6:11p:

>> One of my MT blog's design uses div tags to separate the main text of
>> the entry from a sidebar and apply different styles and layout to each.
>> Divs, being block-level elements, completely inhibit markdown.

J> OK, so basically, your post entries look something like this:
    
J>     <div class="mainarticle">
J>     foo
J>     </div>
    
J>     <div class="sidebar">
J>     bar
J>     </div>

J> And you'd like to use Markdown syntax formatting *inside* the divs,
J> but you can't because Markdown (purposely) skips each entire div
J> block.

J> That's a problem I hadn't anticipated, and I'd be interested to know
J> if other people do something similar.

J> My first thought is that what you're doing is turning MT's entry
J> body field into two fields, as a workaround for the fact that MT
J> doesn't have a mechanism for adding your own custom fields.

J> Off the top of my head, it'd be difficult for Markdown to support
J> this. The idea that Markdown could process text inside HTML blocks
J> is a huge can of worms. Huge. 

J> The only thing I can think of is that there could be some sort of
J> Markdown syntax for adding an HTML block tag which you want Markdown
J> to process the contents of.

J> E.g., if you wrote this:
    
J>     [[div class="whatever"]]
J>     Blah *blah* blah.
J>     [[/div]]

J> Then the "blah blah blah" would get passed through to Markdown for
J> processing, and Markdown would also turn the `[[tags]]` into real
J> `<tags>`:

J>     <div class="whatever">
J>     <p>Blah <em>blah</em> blah.</p>
J>     </div>

J> The `[[tag]]` syntax is just off the top of my head. Maybe `<<tag>>`
J> would be better. I'd have to give it much more thought.


-- 
http://www.make-believe.org



More information about the Markdown-discuss mailing list