Automatic creation of DIVs
jmutchek-markdown at martiansoftware.com
jmutchek-markdown at martiansoftware.com
Sun Feb 13 08:25:19 EST 2005
First off, new mailing list member here. I have been reading the archives
for some time now, but haven't had a need to post (markdown just works, and
works well).
Second, thanks to Pete Bevin for his great work on porting Markdown to Java
(MarkdownJ). Pete has asked me to take over maintenance of the port moving
forward. I will do my best to live up to the standard Pete has set on the
project.
On to the suggestion.
Marty Lamb has suggested a new feature for MarkdownJ that I really like and
would love to see in the core syntax.
Basically, it converts blocks like:
(sidebar)
This is my *sidebar text*.
(end of sidebar)
To:
<div class="sidebar">
<p>This is my <strong>sidebar text</strong>.</p> </div>
The (sidebar) and (end of sidebar) elements must appear on their own lines.
Of course, it's up to stylesheets to do anything special with that div. I
would also have it perform a simple transformation on the contents of the
first parentheses, converting it to lowercase and concatenating multiple
words with an underscore separator, so:
(Java code)
(end of Java code)
becomes:
<div class="java_code">
</div>
I believe that this syntax would fall squarely in the spirit of readable
text source (something I would expect to see in a plain text email).
Marty has a tested implementation for MarkdownJ that works great - I would
be interested to hear the list's opinions.
Thanks,
John
More information about the Markdown-Discuss
mailing list