Goose  Artifact [f5bccf6b58]

Artifact f5bccf6b58f81ea220d5156c9a0201ce33bd401e0b8f0feed2a1ee1f187114ca:

  • File www/highlight.js — part of check-in [6c481d18a4] at 2021-09-12 23:20:40 on branch trunk — Repo: more syntax highlighting workarounds (user: achavasse size: 571)

function HighlightCode()
{
    var code = document.getElementsByTagName( "code" )[0];
    if( code )
    {
        var langType = code.className;

        // Force the highlighter to colorize goose files as cpp files,
        // it's good enough for now
        // Note: fossil seems to be pulling extension from old filenames if they happened to have been renamed.
        if( langType == "language-em" || langType == "language-g" || langType == "language-g0" || langType == "language-g1" )
            code.className = "language-cpp";
    }

    hljs.highlightAll();
}