Matt Kraai
2007-Oct-06 23:37 UTC
seemingly no good way to end bulleted list and start code block
Howdy, The following bug report was sent to the Debian BTS. Is there a way to have a code block immediately follow an unordered list? ----- Forwarded message from Joey Hess <joeyh at debian.org> ----- Consider this markdown: * bla * bla2 this should be treated as code block and it is not ... but if bullets are not above this, it works If the first code block is indented with 8 spaces, or 2 tabs, it will be treated as a nested code block inside the second list item, but there seems to be no way to make it be seen as a code block that immediately follows the list. ----- End forwarded message ----- -- Matt
Lou Quillio
2007-Oct-06 23:52 UTC
seemingly no good way to end bulleted list and start code block
Matt Kraai wrote:> If the first code block is indented with 8 spaces, or 2 tabs, it will be > treated as a nested code block inside the second list item, but there seems > to be no way to make it be seen as a code block that immediately follows > the list.A known shortcoming. http://www.mail-archive.com/markdown-discuss at six.pairlist.net/msg00724.html A secondary, explicit code block syntax would work around it. So far, there's only some 'like' for that idea, no love. LQ
A. Pagaltzis
2007-Oct-07 02:06 UTC
seemingly no good way to end bulleted list and start code block
* Matt Kraai <kraai at ftbfs.org> [2007-10-07 02:55]:> there seems to be no way to make it be seen as a code block > that immediately follows the list.Clumsy, but there is: * bla * bla2 <!-- --> this should be treated as code block Regards, -- Aristotle Pagaltzis // <http://plasmasturm.org/>
Michel Fortin
2007-Oct-07 02:41 UTC
seemingly no good way to end bulleted list and start code block
Le 2007-10-06 ? 19:37, Matt Kraai a ?crit :> Howdy, > > The following bug report was sent to the Debian BTS. Is there a way > to have a code block immediately follow an unordered list?As Aristotle pointed out, there's a workaround: use an HTML comment, like that: * bla * bla <!-- comment --> this is a code block. It's not optimal, but the only solution currently. Note that creating a second paragraph in the list item is correct behaviour, not a bug. That you can't write a code block immediately following a list is unfortunate, but since it would be done using the exact same characters as for adding a paragraph to a list item, it's a design issue we can't really solve without changing some part of the syntax. - - - This issue has been raised many times, and I've been personally biten by it too. I also noticed that with PHP Markdown Extra, many new features (footnotes, definition lists) behave like list items and can't be immediately followed by an indented code block. So I'm seriously thinking about adding a second (unindented) code block syntax to PHP Markdown Extra that would avoid this issue entirely. Something like this: Regular paragraph ~~~ Code block ~~~ Of course, unless John adopts it for Markdown, it'll only benefit users of PHP Markdown Extra. Michel Fortin michel.fortin at michelf.com http://michelf.com/
Matt Kraai
2007-Oct-07 03:11 UTC
seemingly no good way to end bulleted list and start code block
On Sun, Oct 07, 2007 at 04:06:50AM +0200, A. Pagaltzis wrote:> * Matt Kraai <kraai at ftbfs.org> [2007-10-07 02:55]: > > there seems to be no way to make it be seen as a code block > > that immediately follows the list. > > Clumsy, but there is: > > * bla > * bla2 > > <!-- --> > > this should be treated as code blockThanks for the workaround. -- Matt