Hi,
as I wanted to have some extended markup possibilities for my users, cf.
<
https://groups.google.com/forum/?fromgroups=#!topic/liftweb/eItP8aQcKug>,
I extended the TextileParser a bit, mostly
a) to allow class and style attributes for bullet lists and div
elements,
b) to allow <div> as a toplevel element, such that a full Textile
document can be nested within <div>,
and other things, see
https://github.com/liftmodules/textile/pull/6
One consequence of the new/changed <div> behaviour is that the test
"A Textile Parser can deal with multi-line div" does not pass any more.
In the current version,
"""<div class="vcard">
<div class="fn">Joe Doe</div>
<div class="org">The Example Company</div>
<div class="tel">
604-555-1234</div>
http://example.com/
</div>"""
is transformed to
<p><div>
<div>Joe Doe</div>
<div>The Example Company</div>
<div>
604-555-1234</div>
<a href="
http://example.com/">
http://example.com/</a>
</div></p>
With my additions w.r.t. (a), classes are allowed in div elements, such
that this would be transformed to
<p><div class="vcard">
<div class="fn">Joe Doe</div>
<div class="org">The Example Company</div>
<div class="tel">
604-555-1234</div>
<a href="
http://example.com/">
http://example.com/</a>
</div></p>
instead, where I think most people would be ok with those changes.
However, my additions for (b) make <div> a toplevel element, i.e. it's
not necessarily surrounded by <p> any more (which is not allowed by HTML
anyway), i.e. the output that my code generates for the above example is
now:
<div class="vcard">
<div class="fn"><p>Joe Doe</p></div>
<div class="org"><p>The Example Company</p></div>
<div class="tel"><p>
604-555-1234</p></div>
<p><a href="
http://example.com/">
http://example.com/</a></p>
</div>
(The nested divs currently must not be indented any more in the input,
but I guess I should be able to fix this.)
However, for some of the users of TextileParser, this might result in
considerable layout changes of the rendered HTML and Diego suggested to
ask on the list if there is anyone who has concerns about this change.
Otherwise I would love to see those changes in the official TextileParser
(after fixing the indentation issue).
Looking forward to receiving your feedback!
Thanks,
Tobias