1
0
Fork 0
mirror of https://github.com/ethauvin/kobalt-doc.git synced 2025-04-26 12:18:13 -07:00

Syntax highlighting.

This commit is contained in:
Cedric Beust 2015-12-05 16:29:15 -08:00
parent c11be25ff8
commit 6b7427454a
105 changed files with 17571 additions and 91 deletions

View file

@ -0,0 +1,35 @@
<script id="sh_012_server_side_input" type="text/plain">
function helloWorld()
{
// this is great!
for(var i = 0; i <= 1; i++)
alert("yay");
}
</script>
<div id="sh_012_server_side_output">
</div>
<script type="text/javascript">
queue(function()
{
var $sh;
module('012_server_side');
test('generate markup', function()
{
var brush = new SyntaxHighlighter.brushes.JScript(),
code = $('#sh_012_server_side_input').html()
;
brush.init({ toolbar: false });
$sh = $('#sh_012_server_side_output');
$sh.html(brush.getHtml(code));
ok_sh($sh);
ok_gutter($sh);
ok_code($sh);
});
});
</script>