diff --git a/asciidoc-pve.in b/asciidoc-pve.in index 92b0ca2..8550bac 100644 --- a/asciidoc-pve.in +++ b/asciidoc-pve.in @@ -388,8 +388,6 @@ sub compile_asciidoc { if (($env eq 'wiki') || (($env eq 'manvolnum') && ($man_target eq 'wiki'))) { - push @$cmd, '-s'; - if (-f "./asciidoc/mediawiki.conf") { my $cwd = getcwd(); push @$cmd, '-b', "$cwd/asciidoc/mediawiki"; diff --git a/asciidoc/asciidoc.js b/asciidoc/asciidoc.js new file mode 100644 index 0000000..5882248 --- /dev/null +++ b/asciidoc/asciidoc.js @@ -0,0 +1,65 @@ +////////////////////////////////////////////////////////////////////////// +// asciidoc JS helper for Proxmox VE mediawiki pages +// +// code based on original asciidoc.js, but re-written using jQuery +// +////////////////////////////////////////////////////////////////////////// + +var asciidoc = { + + // footnote generator + footnotes: function () { + var noteholder = $("#footnotes"); + if (!noteholder) { + return; + } + + noteholder.html(''); + + // Rebuild footnote entries. + var refs = {}; + var n = 0; + var inner_html = ''; + + $("#asciidoccontent span.footnote").each(function(){ + n++; + var span = $(this); + var note = span.attr("data-note"); + var id = span.attr("id"); + if (!note) { + // Use [\s\S] in place of . so multi-line matches work. + // Because JavaScript has no s (dotall) regex flag. + note = span.html().match(/\s*\[([\s\S]*)]\s*/)[1]; + span.html("[" + n + + "]"); + span.attr("data-note", note); + } + inner_html += + "