Open GoogleCodeExporter opened 8 years ago
mmm...
>>> markdown("\n def func:\n pass\n")
u'<p>def func:\n pass</p>\n'
(expected code block)
may be it`s a bug in my brain...
Original comment by vsevolod.balashov
on 22 Jan 2008 at 12:58
In both cases this is how Markdown.pl (v1.0.1) behaves.
For the original example: there isn't an easy way to disambiguate emiting a code
block (as you expect) or a second paragraph for the list item (the current
actual
behaviour). Hrm. I'm inclined to follow what Markdown.pl does, for consistency.
However, I could see wanting to allow your expected output *if there were
another
empty line separating the list and code block*. E.g.:
markdown("* one\n* two\n\n\n def func:\n pass\n")
For the example in comment 1: Again this is how Markdown.pl behaves, but I
agree that
I think it is a bug:
>>> from markdown2 import markdown
>>> markdown(" def func:\n pass\n")
u'<pre><code>def func:\n pass\n</code></pre>\n'
>>> markdown("\n def func:\n pass\n")
u'<p>def func:\n pass</p>\n'
That leading '\n' should have this effect.
It would be good to bring these up on the markdown-discuss list
(http://six.pairlist.net/mailman/listinfo/markdown-discuss) -- which I'll try
to do soon.
Original comment by tre...@gmail.com
on 23 Jan 2008 at 5:15
> That leading '\n' should have this effect.
I mean: That leading '\n' should NOT have this effect.
Original comment by tre...@gmail.com
on 23 Jan 2008 at 5:16
I think the original Python Markdown processor addresses this the same way the
popular PHP Markdown processor does, with a "fenced code blocks" extension to
the
language.
http://www.freewisdom.org/projects/python-markdown/Fenced_Code_Blocks
http://michelf.com/projects/php-markdown/extra/#fenced-code-blocks
Original comment by dsedi...@gmail.com
on 2 Nov 2009 at 10:35
Original comment by tre...@gmail.com
on 27 May 2010 at 3:10
Thanks for opening this ticket! We have the same problem in askbot.
http://askbot.org/en/question/270/formatting-code-after-a-bullet-doesnt-work
Original comment by evgeny.f...@gmail.com
on 28 Jan 2011 at 5:54
Original issue reported on code.google.com by
vsevolod.balashov
on 22 Jan 2008 at 12:54