On Sat, Jul 12, 2008 at 11:20 AM, Jorge Vargas <[EMAIL PROTECTED]> wrote:
> Today I sat down and wrote a patch to port simple_format to the new
> HTMLBuilder, I have created a ticket for it. feedback is welcome, and
> I hope it can be included in 0.6.1 or something.
> http://pylonshq.com/project/pylonshq/ticket/487
Thanks Jorge. To submit Mercurial patches, you make a bundle via
hg bundle >FILENAME.bundle
That makes a file containing all your changesets that aren't on the server.
The recipient clones their repository to make a test one, runs "hg
unbundle <FILENAME.bundle" to apply it, tests it, and if successful
pushes the changes to their main repository.
We do need a minimal format_paragraphs() helper. Markdown and Textile
do this but they have a too high learning curve and too many features
for many situations. Your function turns blank lines into paragraphs
and puts a <br /> at other newlines. The one thing I would do is to
add a flag to make the <br />'s optional. If I've read a text file
with line breaks, I don't want it putting <br /> on every line. Well,
maybe I do, but maybe I don't? Is there anything else that should
also go into a simple text-to-html formatter while we're at it?
> A simple question.
> - is there a way to "prettify" the HTML rendered by HTMLBuilder? like
> adding whitespace and indentation, for proper template placement?
I don't think so. It doesn't know the current indentation level. It
would probably be best to run HTML.tidy or BeautifulSoup on the
complete webpage. This could be done in a middleware.
--
Mike Orr <[EMAIL PROTECTED]>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"pylons-discuss" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/pylons-discuss?hl=en
-~----------~----~----~----~------~----~------~--~---