Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion Updates to TextileParser; awaiting feedback
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Tobias Pfeiffer  
View profile  
 More options Oct 13 2012, 1:49 pm
From: Tobias Pfeiffer <tob...@tesobe.com>
Date: Sat, 13 Oct 2012 19:48:50 +0200
Local: Sat, Oct 13 2012 1:48 pm
Subject: Updates to TextileParser; awaiting feedback

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

  signature.asc
< 1K Download

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.