From: Waylan L. <way...@ic...> - 2015-02-07 01:44:38
|
Szabolcs, You appear to be using fenced code blocks. However, as stated in the [docs][1], they "are only supported at the document root level. Therefore, they cannot be nested inside lists or blockquotes." As a reminder, fenced code blocks are not part of the Markdown specification. They are an unofficial add on. The standard way of adding code blocks is to indent them. When nested in a list, you need to double indent them, once to nest them in a list, and once to format them as code blocks. It appears that you have done that in your example. Of course, that doesn't identify the language. However, the [docs][2] for the CodeHilite extension describe three different ways to identify the language of a given code block. I suspect you will find that helpful. Waylan Limberg [1]: https://pythonhosted.org/Markdown/extensions/fenced_code_blocks.html#syntax [2]: https://pythonhosted.org/Markdown/extensions/code_hilite.html#syntax On Feb 06, 2015, at 01:33 PM, Szabolcs Horvát <szh...@gm...> wrote: Hello, I am (indirectly) using Python Markdown with the codehilite extension. When writing markdown compatible with this processor, is there a way to specify the highlighting language for a code block contained within a list? Take for example, ---- 1. List element one 2. List element two has a code block <some> "code" here() ---- When the code block is not in a list, I can use ```langspec <some> "code" here() ``` but the ``` doesn't seem to be allowed within lists. Is there a workaround? I don't expect that there will be, but I thought I'd ask, just in case. -- Szabolcs ------------------------------------------------------------------------------ Dive into the World of Parallel Programming. The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net/ _______________________________________________ Python-markdown-discuss mailing list Pyt...@li... https://lists.sourceforge.net/lists/listinfo/python-markdown-discuss |