mirror of
https://github.com/ethauvin/kobalt-doc.git
synced 2025-04-25 12:07:10 -07:00
Syntax highlighting.
This commit is contained in:
parent
c11be25ff8
commit
6b7427454a
105 changed files with 17571 additions and 91 deletions
39
sh/tests/cases/006_pad_line_numbers.html
Normal file
39
sh/tests/cases/006_pad_line_numbers.html
Normal file
|
@ -0,0 +1,39 @@
|
|||
<pre id="sh_006_pad_line_numbers" class="brush: java; pad-line-numbers: true">
|
||||
/**
|
||||
* Returns an Image object that can then be painted on the screen.
|
||||
* The url argument must specify an absolute {@link URL}. The name
|
||||
* argument is a specifier that is relative to the url argument.
|
||||
*
|
||||
* @param url an absolute URL giving the base location of the image
|
||||
* @param name the location of the image, relative to the url argument
|
||||
* @return the image at the specified URL
|
||||
* @see Image
|
||||
*/
|
||||
</pre>
|
||||
|
||||
<script type="text/javascript">
|
||||
queue(function()
|
||||
{
|
||||
var $sh;
|
||||
|
||||
module('006_pad_line_numbers');
|
||||
|
||||
test('check that line numbers are padded with zeroes', function()
|
||||
{
|
||||
$sh = $('#sh_006_pad_line_numbers');
|
||||
|
||||
ok_sh($sh);
|
||||
ok_toolbar($sh);
|
||||
ok_gutter($sh);
|
||||
ok_code($sh);
|
||||
|
||||
$sh.find('.gutter > .line').each(function(index)
|
||||
{
|
||||
var text = $(this).text();
|
||||
|
||||
if (parseInt(text) < 10)
|
||||
ok(text.charAt(0) == '0', 'Line ' + index + ' has leading zero: ' + text);
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue