call initLanguage after initTheme

See #530654
master
Joey Hess 2009-05-26 17:04:49 -04:00
parent fd7db49f94
commit 96087cbd88
1 changed files with 1 additions and 1 deletions

View File

@ -128,8 +128,8 @@ sub highlight ($$) {
$gen = highlightc::CodeGenerator_getInstance($highlightc::XHTML); $gen = highlightc::CodeGenerator_getInstance($highlightc::XHTML);
$gen->setFragmentCode(1); # generate html fragment $gen->setFragmentCode(1); # generate html fragment
$gen->setHTMLEnclosePreTag(1); # include stylish <pre> $gen->setHTMLEnclosePreTag(1); # include stylish <pre>
$gen->initLanguage($langfile);
$gen->initTheme("/dev/null"); # theme is not needed because CSS is not emitted $gen->initTheme("/dev/null"); # theme is not needed because CSS is not emitted
$gen->initLanguage($langfile); # must come after initTheme
$gen->setEncoding("utf-8"); $gen->setEncoding("utf-8");
$highlighters{$langfile}=$gen; $highlighters{$langfile}=$gen;
} }