diff --git a/js/multicodetab.js b/js/multicodetab.js
index 27d9f86055..b5eea7f698 100644
--- a/js/multicodetab.js
+++ b/js/multicodetab.js
@@ -16,7 +16,6 @@ jQuery.fn.multicode_tabs = function() {
// for each code, give it a unique ID and wrap it in a pre
cb_area.children('code').each(function(index2,el2) {
var linkid = 'code-'+index+'-'+index2;
-// $(el2).attr('id', linkid);
$(el2).wrap("
");
//also put in a link to this in the tab header ul
$('ul', cb_area).append("
");
@@ -32,6 +31,38 @@ jQuery.fn.multicode_tabs = function() {
$('.multicode').minitabs();
}
+
+// Variant version for the HTML that Pandoc generates
+// Expects markup in the form of:
+//
+//
tab 1 title
+//
tab 1 code block
+//
tab 2 title
+//
tab 2 code block
+//
+jQuery.fn.multicode_tabs_pandoc = function() {
+ $('.multicode').each(function(index,el) {
+ cb_area = $(el);
+ cb_area.attr('id', "code-"+index);
+ // make a ul to house the tab headers
+ cb_area.prepend("