Syntax Questions

2008-07-17 Thread Jurgens du Toit
Hey :)

Is it a bug or a feature that the following two texts get formatted
differently?

My shopping list
+ Bread
+ Milk
+ Cheese

My shopping list

+ Bread
+ Milk
+ Cheese

In the first one, the list doesn't get converted to an unordered list, while
in the second, it does...


It occurs in both markdown and markdown extra, btw.

J

-- 
Website: www.jrgns.net

If people never did silly things, nothing intelligent would ever get done.
- Ludwig Wittgenstein
___
Markdown-Discuss mailing list
Markdown-Discuss@six.pairlist.net
http://six.pairlist.net/mailman/listinfo/markdown-discuss


Re: Syntax Questions

2008-07-17 Thread Aristotle Pagaltzis
* Jurgens du Toit <[EMAIL PROTECTED]> [2008-07-17 14:25]:
> Is it a bug or a feature that the following two texts get
> formatted differently?

That’s on purpose. To make a list, it needs to be in a separate
paragraph.

Regards,
-- 
Aristotle Pagaltzis // 
___
Markdown-Discuss mailing list
Markdown-Discuss@six.pairlist.net
http://six.pairlist.net/mailman/listinfo/markdown-discuss


Markdown Editor plugin for Eclipse

2008-07-17 Thread Daniel Winterstein
Hello,

I'd like to announce an improved version of my Markdown Editor plugin
for the popular Eclipse Java + everything else IDE. The Markdown
plugin has moved from it's old location. The new location is:

http://winterwell.com/software/markdown-editor.php

There's syntax highlighting, a preview window, and it can export to
html. The best feature is the document outline, which is a joy for
editing large documents.
Plus you can use TODO tags and these get picked up as tasks, and an
emacs-style text formatting tool.

All the best,
 - Daniel

-- 
"I know nothing, understand less, & most of that is wrong."

 Daniel Winterstein
 Edinburgh
___
Markdown-Discuss mailing list
Markdown-Discuss@six.pairlist.net
http://six.pairlist.net/mailman/listinfo/markdown-discuss


Re: Syntax Questions

2008-07-17 Thread Jurgens du Toit
Ok.

Is it possible to modify the code to do that? Can you point me in the right
direction?

It's something I'd realy like to be able to do, even if it is a configurable
options.

Another thing, is it possible to convert newlines to  tags? I tried
nl2br before and after passing the string to markdown, but either way
there's to many br tags then.

Thanx!
J

On Thu, Jul 17, 2008 at 3:31 PM, Aristotle Pagaltzis <[EMAIL PROTECTED]>
wrote:

> * Jurgens du Toit <[EMAIL PROTECTED]> [2008-07-17 14:25]:
> > Is it a bug or a feature that the following two texts get
> > formatted differently?
>
> That's on purpose. To make a list, it needs to be in a separate
> paragraph.
>
> Regards,
> --
> Aristotle Pagaltzis // 
> ___
> Markdown-Discuss mailing list
> Markdown-Discuss@six.pairlist.net
> http://six.pairlist.net/mailman/listinfo/markdown-discuss
>



-- 
Website: www.jrgns.net

If people never did silly things, nothing intelligent would ever get done.
 - Ludwig Wittgenstein
___
Markdown-Discuss mailing list
Markdown-Discuss@six.pairlist.net
http://six.pairlist.net/mailman/listinfo/markdown-discuss


Re: Syntax Questions

2008-07-17 Thread John Gabriele
On Thu, Jul 17, 2008 at 9:49 AM, Jurgens du Toit
<[EMAIL PROTECTED]> wrote:
> Ok.
>
> Is it possible to modify the code to do that?

Very probably, but you may not want to. My impression is that there's
a lot of tradeoffs in Markdown between it trying to do what you mean
and it requiring non-ambiguous markup. For example, if you've got a
paragraph with a plus sign in it, and you have your editor re-wrap it,
you might end up with a line starting with that plus sign. You
wouldn't want Markdown to think it's a one-item list.

It's also not terribly easy to read without that leading newline.

> Can you point me in the right
> direction?

You might look in the `_DoLists` function.

> It's something I'd realy like to be able to do, even if it is a configurable
> options.
>
> Another thing, is it possible to convert newlines to  tags? I tried
> nl2br before and after passing the string to markdown, but either way
> there's to many br tags then.

You can end a line with 2 or more spaces and it will create a  for you.

---John
___
Markdown-Discuss mailing list
Markdown-Discuss@six.pairlist.net
http://six.pairlist.net/mailman/listinfo/markdown-discuss


Re: Syntax Questions

2008-07-17 Thread Jurgens du Toit
On Thu, Jul 17, 2008 at 4:11 PM, John Gabriele <[EMAIL PROTECTED]> wrote:

> On Thu, Jul 17, 2008 at 9:49 AM, Jurgens du Toit
> <[EMAIL PROTECTED]> wrote:
> > Ok.
> >
> > Is it possible to modify the code to do that?
>
> Very probably, but you may not want to. My impression is that there's
> a lot of tradeoffs in Markdown between it trying to do what you mean
> and it requiring non-ambiguous markup. For example, if you've got a
> paragraph with a plus sign in it, and you have your editor re-wrap it,
> you might end up with a line starting with that plus sign. You
> wouldn't want Markdown to think it's a one-item list.


I understand it to be tricky. I'll play around, and, if I don't like it,
adapt and learn!

>
>
> It's also not terribly easy to read without that leading newline.
>
> > Can you point me in the right
> > direction?
>
> You might look in the `_DoLists` function.

Schweet, will do.

>
>
> > It's something I'd realy like to be able to do, even if it is a
> configurable
> > options.
> >
> > Another thing, is it possible to convert newlines to  tags? I tried
> > nl2br before and after passing the string to markdown, but either way
> > there's to many br tags then.
>
> You can end a line with 2 or more spaces and it will create a  for
> you.


Didn't know that one, but, once again, not exactly what I want. Darn 'it,
looks like I'll have to adapt...

Any special reason why single newlines don't get converted to ? I'm
thinking that if it happens right at the end of the manipulations, and
newlines between closing and opening block tags (such as <\p>\n) get
ignored, it will work? Or, actually more simple, only newlines between
certain tags, such as p and div?

J

>
>
> ---John
> ___
> Markdown-Discuss mailing list
> Markdown-Discuss@six.pairlist.net
> http://six.pairlist.net/mailman/listinfo/markdown-discuss
>



-- 
Jurgens du Toit
Cell: +27 83 511 7932
Fax: +27 86 503 2637
Website: www.jrgns.net

If people never did silly things, nothing intelligent would ever get done.
- Ludwig Wittgenstein
___
Markdown-Discuss mailing list
Markdown-Discuss@six.pairlist.net
http://six.pairlist.net/mailman/listinfo/markdown-discuss


Re: Syntax Questions

2008-07-17 Thread Jan Erik Moström

Jurgens du Toit <[EMAIL PROTECTED]> 08-07-17 20.12


Any special reason why single newlines don't get converted to ? I'm
thinking that if it happens right at the end of the manipulations, and
newlines between closing and opening block tags (such as <\p>\n) get
ignored, it will work? Or, actually more simple, only newlines between
certain tags, such as p and div?


I'm not sure I understand, do you mean that you want a text like this:

This is just
an example
text

to be translated into


This is just
an example
text


Or am I misunderstanding things?

jem
--
Jan Erik Moström, www.mostrom.pp.se

___
Markdown-Discuss mailing list
Markdown-Discuss@six.pairlist.net
http://six.pairlist.net/mailman/listinfo/markdown-discuss


Re: Syntax Questions

2008-07-17 Thread Jurgens du Toit
Exactly that, yes.

On Thu, Jul 17, 2008 at 10:00 PM, Jan Erik Moström <[EMAIL PROTECTED]>
wrote:

> Jurgens du Toit <[EMAIL PROTECTED]> 08-07-17 20.12
>
>  Any special reason why single newlines don't get converted to ? I'm
>> thinking that if it happens right at the end of the manipulations, and
>> newlines between closing and opening block tags (such as <\p>\n) get
>> ignored, it will work? Or, actually more simple, only newlines between
>> certain tags, such as p and div?
>>
>
> I'm not sure I understand, do you mean that you want a text like this:
>
> This is just
> an example
> text
>
> to be translated into
>
> 
> This is just
> an example
> text
> 
>
> Or am I misunderstanding things?
>
>jem
> --
> Jan Erik Moström, www.mostrom.pp.se
>
>
> ___
> Markdown-Discuss mailing list
> Markdown-Discuss@six.pairlist.net
> http://six.pairlist.net/mailman/listinfo/markdown-discuss
>



-- 
Jurgens du Toit
Cell: +27 83 511 7932
Fax: +27 86 503 2637
Website: www.jrgns.net

If people never did silly things, nothing intelligent would ever get done.
- Ludwig Wittgenstein
___
Markdown-Discuss mailing list
Markdown-Discuss@six.pairlist.net
http://six.pairlist.net/mailman/listinfo/markdown-discuss


Re: Syntax Questions

2008-07-17 Thread Jan Erik Moström

Jurgens du Toit <[EMAIL PROTECTED]> 08-07-17 22.13


Exactly that, yes.


Well, there is a good reason why Markdown doesn't do this. Many 
prefer to use a plain text editor which doesn't wrap text (I for 
example prefer my text files this way) and we insert hard new 
lines to keep the lines from becoming too long. If those hard 
newlines were translated into  Markdown would be useless 
for a lot of people.


(and I don't think there is an option to get it to behave the 
way you want)


jem
--
Jan Erik Moström, www.mostrom.pp.se

___
Markdown-Discuss mailing list
Markdown-Discuss@six.pairlist.net
http://six.pairlist.net/mailman/listinfo/markdown-discuss


Re: Syntax Questions

2008-07-17 Thread Michel Fortin

Le 2008-07-17 à 10:11, John Gabriele a écrit :


On Thu, Jul 17, 2008 at 9:49 AM, Jurgens du Toit
<[EMAIL PROTECTED]> wrote:

Ok.

Is it possible to modify the code to do that?


Very probably, but you may not want to. My impression is that there's
a lot of tradeoffs in Markdown between it trying to do what you mean
and it requiring non-ambiguous markup. For example, if you've got a
paragraph with a plus sign in it, and you have your editor re-wrap it,
you might end up with a line starting with that plus sign. You
wouldn't want Markdown to think it's a one-item list.


Well, that's almost the exact reason this was changed, a long time ago
now. The problem was with sentences finishing with a number in the
middle of a hard-wrapped paragraph. For instance, I could say: "I want
2. He wants 3.", and then you'd have a strange list popping in the
middle of your otherwise normal paragraph.

The requirement of a blank line goes away when a list is nested in
another, so you can write nice-looking hierarchical lists:

1.  Test
*   Test
*   Test


Michel Fortin
[EMAIL PROTECTED]
http://michelf.com/


___
Markdown-Discuss mailing list
Markdown-Discuss@six.pairlist.net
http://six.pairlist.net/mailman/listinfo/markdown-discuss


Re: Syntax Questions

2008-07-17 Thread Michel Fortin

Le 2008-07-17 à 16:41, Jan Erik Moström a écrit :

Well, there is a good reason why Markdown doesn't do this. Many  
prefer to use a plain text editor which doesn't wrap text (I for  
example prefer my text files this way) and we insert hard new lines  
to keep the lines from becoming too long. If those hard newlines  
were translated into  Markdown would be useless for a lot of  
people.


That's one reason. Personally, I often generally don't write hard- 
wrapped paragraphs... except inside lists and blockquotes where I  
wants things aligned properly in the source text.


For instance, I don't want my text editor to wrap automatically my  
like item like this:


1.  First item of a list with two lines worth wasted text
for your reading pleasure.

So I indent correctly the second line to make it better looking and  
easier to write:


1.  First item of a list with two lines worth wasted text
for your reading pleasure.

By doing this, I'm inserting a newline character at the end of each  
line. If Markdown was adding a line break there, then I'd be forced to  
write the bad-looking version, reducing readability of the source text.


The same applies to blockquotes:

> This and that and this and that and this
> and that and this.

You couldn't indent each line with a ">" if Markdown was to convert  
every newline to a ``.



(and I don't think there is an option to get it to behave the way  
you want)



No there isn't one.


Michel Fortin
[EMAIL PROTECTED]
http://michelf.com/


___
Markdown-Discuss mailing list
Markdown-Discuss@six.pairlist.net
http://six.pairlist.net/mailman/listinfo/markdown-discuss