Re: Questions on markdown

2011-07-06 Thread Benoit Perdu - TransMékong
Leo,

If you want to wrap without the end of a paragraph, you should end your
lines with 2 or more spaces then do a single new line.

This is as per the standard Markdown behaviour.

Also, make sure you parse all the text you need parsed in one go, not
line by line.

All the best

Benoit

On 11-07-04 08:02 PM, leo wrote:
> Yes, you totally understood me,actually I copied the text from word and
> paste into textfield, it is very inconvenience manually add a blank line
> and also as you mentioned,if I put blank line between each line the
> appearance
> is not what i like i like this
>  
> Action: check WSMB
> Reason: customer check this then got error
> Result: finish, result is good, in spec
>
> so do you have any suggestion to achieve this goal?
>
> Thank you very much.
>
> On 2011-7-5 1:46, creecode wrote:
>> Hello Liu,
>>
>> On Monday, July 4, 2011 10:06:29 AM UTC-7, Liu Lin wrote:
>>
>> If I understand your post correctly you are entering in something like...
>>
>> Action: check WSMB
>> Reason: customer check this then got error
>> Result: finish, result is good, in spec
>>
>> ...in a field of your form.  Upon save you process this field with
>> markdown and you want to store something like...
>>
>> Action: check WSMB
>> Reason: customer check this then got error
>> Result: finish, result is good, in spec
>>  
>> I'm no markdown expert but I would say this is a problem of your
>> understanding of how markdown turns it's markup and into html not a
>> problem with Django or the markdown package.
>>
>> To achieve the results you want I think you would need to enter
>> something like...
>>
>> Action: check WSMB
>>
>> Reason: customer check this then got error
>>
>> Result: finish, result is good, in spec
>>
>> You need a blank line between each line.
>>
>> Alternately you could preprocess the input and add the extra lines
>> yourself before processing with markdown..
>>
>> Toodle-looo...
>> creecode
>> -- 
>> You received this message because you are subscribed to the Google
>> Groups "Django users" group.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msg/django-users/-/Tjkni_VHXCUJ.
>> To post to this group, send email to django-users@googlegroups.com.
>> To unsubscribe from this group, send email to
>> django-users+unsubscr...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/django-users?hl=en.
>
> -- 
> chlin
> -- 
> 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
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.

-- 
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 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Questions on markdown

2011-07-05 Thread leo

thank you all good news, with your help, I found a
way to achieve my goal.

on the way to what i want.

On 2011-7-5 23:04, bruno desthuilliers wrote:


On Jul 5, 3:23 pm, Derek  wrote:

Good news: you're using Python and text processing is easy in Python.
Bad news:  even if you're using Python, you still have to know how to
use it ;)


Good news: you sometimes don't have anything to do - except, of
course, reading the FineManual(tm) and using the appropriate filters:
https://docs.djangoproject.com/en/1.3/ref/templates/builtins/#linebreaks

@OP: unless of course you wanted to use other markup features



--
chlin

--
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 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Questions on markdown

2011-07-05 Thread bruno desthuilliers


On Jul 5, 3:23 pm, Derek  wrote:
>
> Good news: you're using Python and text processing is easy in Python.
> Bad news:  even if you're using Python, you still have to know how to
> use it ;)


Good news: you sometimes don't have anything to do - except, of
course, reading the FineManual(tm) and using the appropriate filters:
https://docs.djangoproject.com/en/1.3/ref/templates/builtins/#linebreaks

@OP: unless of course you wanted to use other markup features

-- 
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 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Questions on markdown

2011-07-05 Thread Derek
On Jul 5, 12:03 pm, DrBloodmoney  wrote:
> On Mon, Jul 4, 2011 at 2:22 PM, Petite Abeille  
> wrote:
>
> > On Jul 4, 2011, at 8:08 PM, leo wrote:
>
> >> what i want is
>
> > To quote the friendly manual:
>
> > "When you do want to insert a  break tag using Markdown, you end a 
> > line with two or more spaces, then type return."
>
> >http://daringfireball.net/projects/markdown/syntax#p
>
> If you're copy/pasting test that's not Markdown, then Markdown will
> not magically help you. If you have unformatted text that you want to
> turn into html, you're probably going to have to do a little text
> pre-processing.

Good news: you're using Python and text processing is easy in Python.
Bad news:  even if you're using Python, you still have to know how to
use it ;)

-- 
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 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Questions on markdown

2011-07-05 Thread DrBloodmoney
On Mon, Jul 4, 2011 at 2:22 PM, Petite Abeille  wrote:
>
> On Jul 4, 2011, at 8:08 PM, leo wrote:
>
>> what i want is
>
> To quote the friendly manual:
>
> "When you do want to insert a  break tag using Markdown, you end a line 
> with two or more spaces, then type return."
>
> http://daringfireball.net/projects/markdown/syntax#p

If you're copy/pasting test that's not Markdown, then Markdown will
not magically help you. If you have unformatted text that you want to
turn into html, you're probably going to have to do a little text
pre-processing. Good news: you're using Python and text processing is
easily in python.

-- 
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 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Questions on markdown

2011-07-04 Thread Petite Abeille

On Jul 4, 2011, at 8:08 PM, leo wrote:

> what i want is

To quote the friendly manual:

"When you do want to insert a  break tag using Markdown, you end a line 
with two or more spaces, then type return."

http://daringfireball.net/projects/markdown/syntax#p

-- 
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 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Questions on markdown

2011-07-04 Thread leo

The original text is

Action: check WSMB
Reason: customer check this then got error
Result: finish, result is good, in spec

what i want is

html format

Action: check WSMB
Reason: customer check this then got error
Result: finish, result is good, in spec





On 2011-7-5 1:59, Masklinn wrote:

On 2011-07-04, at 19:06 , leo wrote:

I using a textfield to store some information and in admin
input interface i enter like this


Action: check WSMB
Reason: customer check this then got error
Result: finish, result is good, in spec

every single sentence every row, I using markdown to convert
this plain text to html but it did not go as i expected.

the formated text is below,


Action: check WSMB
Reason: customer check this then got error
Result: finish, result is good, in spec

this is not what i expected, i want every single sentence every row,
it misses some html mark.
what should i do?

someone help me.

Well depends. This behavior is as per "spec" for the original markdown dialect: 
single newlines are ignored (they're basically seen as line wrapping), double newlines 
create new paragraphs, ending a line with two spaces creates a hard return.

Since you have not specified what you expect your markdown text to become, 
there is little we can do to help you with.



--
chlin

--
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 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Questions on markdown

2011-07-04 Thread leo

Yes, you totally understood me,actually I copied the text from word and
paste into textfield, it is very inconvenience manually add a blank line
and also as you mentioned,if I put blank line between each line the 
appearance

is not what i like i like this

Action: check WSMB
Reason: customer check this then got error
Result: finish, result is good, in spec

so do you have any suggestion to achieve this goal?

Thank you very much.

On 2011-7-5 1:46, creecode wrote:

Hello Liu,

On Monday, July 4, 2011 10:06:29 AM UTC-7, Liu Lin wrote:

If I understand your post correctly you are entering in something like...

Action: check WSMB
Reason: customer check this then got error
Result: finish, result is good, in spec

...in a field of your form.  Upon save you process this field with 
markdown and you want to store something like...


Action: check WSMB
Reason: customer check this then got error
Result: finish, result is good, in spec

I'm no markdown expert but I would say this is a problem of your 
understanding of how markdown turns it's markup and into html not a 
problem with Django or the markdown package.


To achieve the results you want I think you would need to enter 
something like...


Action: check WSMB

Reason: customer check this then got error

Result: finish, result is good, in spec

You need a blank line between each line.

Alternately you could preprocess the input and add the extra lines 
yourself before processing with markdown..


Toodle-looo...
creecode
--
You received this message because you are subscribed to the Google 
Groups "Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/Tjkni_VHXCUJ.

To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.


--
chlin

--
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 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Questions on markdown

2011-07-04 Thread Masklinn
On 2011-07-04, at 19:06 , leo wrote:
> I using a textfield to store some information and in admin
> input interface i enter like this
> 
> 
> Action: check WSMB
> Reason: customer check this then got error
> Result: finish, result is good, in spec
> 
> every single sentence every row, I using markdown to convert
> this plain text to html but it did not go as i expected.
> 
> the formated text is below,
> 
> 
> Action: check WSMB
> Reason: customer check this then got error
> Result: finish, result is good, in spec
> 
> this is not what i expected, i want every single sentence every row,
> it misses some html mark.
> what should i do?
> 
> someone help me.
Well depends. This behavior is as per "spec" for the original markdown dialect: 
single newlines are ignored (they're basically seen as line wrapping), double 
newlines create new paragraphs, ending a line with two spaces creates a hard 
return.

Since you have not specified what you expect your markdown text to become, 
there is little we can do to help you with.

-- 
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 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Questions on markdown

2011-07-04 Thread creecode
Hello Liu,

On Monday, July 4, 2011 10:06:29 AM UTC-7, Liu Lin wrote:

If I understand your post correctly you are entering in something like...

> Action: check WSMB
> Reason: customer check this then got error
> Result: finish, result is good, in spec
>
...in a field of your form.  Upon save you process this field with markdown 
and you want to store something like...

Action: check WSMB
Reason: customer check this then got error
Result: finish, result is good, in spec
 
I'm no markdown expert but I would say this is a problem of your 
understanding of how markdown turns it's markup and into html not a problem 
with Django or the markdown package.

To achieve the results you want I think you would need to enter something 
like...

Action: check WSMB

Reason: customer check this then got error

Result: finish, result is good, in spec

You need a blank line between each line.

Alternately you could preprocess the input and add the extra lines yourself 
before processing with markdown..

Toodle-looo...
creecode

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/Tjkni_VHXCUJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.