demydd / pandoc

Automatically exported from code.google.com/p/pandoc
0 stars 0 forks source link

default language for codeblocks #87

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
see the text below for a description of the enhancement, which i posted
recently to pandoc-discuss.

a diff is attached; please feel free to use/modify/ignore it.

note that i have not updated README to mention the new option

---

i love the new syntax-highlighting of codeblocks, but the one downside
for me is having to use delimited-codeblock sytax and the language
annotation for all my code snippets, where previously the indented-
code syntax was so simple and readable.

but it was easy (what nice code!) to add a --default-codeblock-class
option to pandoc, which is then used to populate a new writer option
that specifies the classes to use for a codeblock when none have been
specified (which is the result of an indentation-style codeblock).

now all my code is magically highlighted, without changing the
markdown at all!  (and for the rare case of code that shouldn't be
highlighted, i can use the delimited syntax to give some non-assigned
"language" like "ignore".) 

Original issue reported on code.google.com by butt...@gmail.com on 3 Oct 2008 at 11:05

Attachments:

GoogleCodeExporter commented 8 years ago

Original comment by fiddloso...@gmail.com on 18 Oct 2008 at 11:16

GoogleCodeExporter commented 8 years ago

Original comment by fiddloso...@gmail.com on 2 Nov 2008 at 5:04

GoogleCodeExporter commented 8 years ago
This issue was closed by revision r1637.

Original comment by fiddloso...@gmail.com on 1 Dec 2009 at 6:56

GoogleCodeExporter commented 8 years ago
I've added this -- with a slightly different name, --default-code-classes, and
slightly different behavior -- it inserts the classes in the reader, not the 
writer,
and only for indented code blocks.  Thanks for the patch.

Original comment by fiddloso...@gmail.com on 1 Dec 2009 at 7:03

GoogleCodeExporter commented 8 years ago
Looking at the patch, I'm not sure - is there anyway to specify the default 
language
inline? I'm thinking of Gitit.

Original comment by gwe...@gmail.com on 1 Dec 2009 at 1:43