On 02/05/06, Ga=EBl Varoquaux <gae...@no...> wrote:
>
> Hi,
>
> Am I wrong or is page['page-description'] a html paragraph (ie enclosed
> in <p> ... </p>). Now say I want to use section_contents to list the
> sub-sections in such a way :
>
> <ul>
> <li> <a href=3D"link/to/subsection">crumb</a> description
> <li> <a href=3D"link/to/subsection">crumb</a> description
> ...
> </ul>
>
> I have to cut out the <p> and </p> of the description. Now I just
> realised that I didn't exactly need the re module to do this, so it is
> not as costly as I thought, (I can use description[3:-4], which is ugly
> but should work).
>
> I guess there is a good reason for having the paragraph marker in
> the description, and not adding them by hand: the description can
> probably be multi-paragraph, eventhough this is not a feature that I
> use.
>
> So I have two questions:
> * Is it true that the description can be mutli-paragraph ? If not I
> suggest to remove the enclosing <p> ... </p> from the description.
> This will break web-pages, I know, but I think the gain in
> flexibility is worth the while. And desides rest2web is still a
> young product so it is the time to break and rebuild things.
The page-description is rendered into HTML by docutils. This (correctly
IMHO) puts paragraph markers around paragraphs. Yes, descriptions can be
multi paragraph, many of mine are.
You could use CSS to style the paragraph inside a list item, but I think
that if you have single paragraph descriptions you *can* rely on the
description being wrapped in '<p>...</p>'.
That may change if docutils changes the way it does things.
A feature I may add soon is supporting multiple markup formats. (It wouldn'=
t
be very difficult, it's just a question of priorities.) When I do that I
will probably have to add a way of specifying the markup format of
descriptions in the restindex (defaulting to ReST of course).
This would allow you to have html page-descriptions, and completely control
how they appear.
Of course it's vapourware at the moment. :-)
Fuzzyman
http://www.voidspace.org.uk/python/index.shtml
* Can I rely on the paragraph marker being present on every single
> paragraph description, and use my workaround without fearing
> cutting something else ?
>
> --
> Ga=EBl
>
>
> -------------------------------------------------------
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job
> easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronim=
o
> http://sel.as-us.falkag.net/sel?cmdlnk&kid=120709&bid&3057&dat=121642
> _______________________________________________
> Rest2web-develop mailing list
> Res...@li...
> https://lists.sourceforge.net/lists/listinfo/rest2web-develop
>
--
http://www.Voidspace.org.uk
The Place where headspace meets cyberspace. Online resource site - covering
science, technology, computing, cyberpunk, psychology, spirituality, fictio=
n
and more.
---
http://www.Voidspace.org.uk/python/index.shtml
Python utilities, modules and apps.
Including Nanagram, Dirwatcher and more.
---
http://www.fuchsiashockz.co.uk
http://groups.yahoo.com/group/void-shockz
---
Everyone has talent. What is rare is the courage to follow talent
to the dark place where it leads. -Erica Jong
Ambition is a poor excuse for not having sense enough to be lazy.
-Milan Kundera
|