Actually, after test for 2 days,
i find this code translate  enter once to "<p>" , and enter twice is
still "<p>".
i want keep "<BR>", ie. enter once i get a "<BR>", enter twice i get a
"<p>"
is this possible?
thx!


On 9月3日, 下午4时15分, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
> it is ok now, thx Tim
>
> On 9月3日, 上午6时29分, Tim Chase <[EMAIL PROTECTED]> wrote:
>
>
>
>
>
> > > but this is the same as enter twice,  user must remember to end with
> > > one or more space.
>
> > > is there other plugin like markdown which is a truely what they is
> > > what they get?
>
> > Well, it's possible to pre-process the user's input with
> > something like
>
> > import re
> > add_br_re = re.compile('\n+')
> > in_text = get_text_from_user_somehow()
> > out_text = add_br_re.sub('\n\n', in_text)
> > process_with_markdown(out_text)
>
> > This will normalize all newlines to a pair of newlines.
>
> > -tim


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to