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:
parent
c11be25ff8
commit
6b7427454a
105 changed files with 17571 additions and 91 deletions
35
sh/tests/cases/012_server_side.html
Normal file
35
sh/tests/cases/012_server_side.html
Normal 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>
|
Loading…
Add table
Add a link
Reference in a new issue