diff --git a/build/data.json b/build/data.json index 09a5c7d0e..742a09d6a 100644 --- a/build/data.json +++ b/build/data.json @@ -44,7 +44,7 @@ "first_name": "Cedric", "last_name": "Kelly", "age": "22", - "position": "Senior Javascript Developer", + "position": "Senior JavaScript Developer", "salary": "433060", "start_date": "2012-03-29", "extn": "6224", @@ -109,7 +109,7 @@ "first_name": "Colleen", "last_name": "Hurst", "age": "39", - "position": "Javascript Developer", + "position": "JavaScript Developer", "salary": "205500", "start_date": "2009-09-15", "extn": "2360", @@ -642,7 +642,7 @@ "first_name": "Jennifer", "last_name": "Acosta", "age": "43", - "position": "Junior Javascript Developer", + "position": "Junior JavaScript Developer", "salary": "75650", "start_date": "2013-02-01", "extn": "3431", @@ -720,7 +720,7 @@ "first_name": "Michael", "last_name": "Bruce", "age": "29", - "position": "Javascript Developer", + "position": "JavaScript Developer", "salary": "183000", "start_date": "2011-06-27", "extn": "5384", diff --git a/build/examples-format.sh b/build/examples-format.sh index 0555b0350..c5e2a0db3 100755 --- a/build/examples-format.sh +++ b/build/examples-format.sh @@ -2,7 +2,7 @@ # # Can be used on both examples directories and docs. Each has -# slightly different processing - the docs is more aggrasive +# slightly different processing - the docs is more aggressive # in updating code style. # # Call with the path to the directory with the xml files you diff --git a/build/examples.php b/build/examples.php index ba0f06fb8..8a0a89f02 100644 --- a/build/examples.php +++ b/build/examples.php @@ -336,7 +336,7 @@ function multiple ( $value, $fn ) { if ( is_array( $value ) ) { - for ( $i=0, $ien=count($value) ; $i<$ien ; $i++ ) { + for ( $i=0, $iLen=count($value) ; $i<$iLen ; $i++ ) { $fn( $value[$i] ); } } @@ -660,7 +660,7 @@ function sql_files ( $out_dir ) ); $out = []; - for ( $i=0, $ien=count($json) ; $i<$ien ; $i++ ) { + for ( $i=0, $iLen=count($json) ; $i<$iLen ; $i++ ) { $out[] = "( ". $json[$i]['id'].", ". "'".$json[$i]['first_name']."', ". @@ -771,7 +771,7 @@ function sql_files ( $out_dir ) VALUES EOD; $out = []; - for ( $i=0, $ien=count($json) ; $i<$ien ; $i++ ) { + for ( $i=0, $iLen=count($json) ; $i<$iLen ; $i++ ) { $out[] = "( ". $json[$i]['id'].", ". "'".$json[$i]['first_name']."', ". @@ -823,7 +823,7 @@ function sql_files ( $out_dir ) VALUES EOD; $insert = []; - for ( $i=0, $ien=count($json) ; $i<$ien ; $i++ ) { + for ( $i=0, $iLen=count($json) ; $i<$iLen ; $i++ ) { $insert[] = "\t\t( ". $json[$i]['id'].", ". "'".$json[$i]['first_name']."', ". @@ -882,7 +882,7 @@ function sql_files ( $out_dir ) EOD; - for ( $i=0, $ien=count($json) ; $i<$ien ; $i++ ) { + for ( $i=0, $iLen=count($json) ; $i<$iLen ; $i++ ) { $str .= "INSERT INTO \"datatables_demo\" ". "( \"first_name\", \"last_name\", \"age\", \"position\", \"salary\", \"start_date\", \"extn\", \"email\", \"office\", \"seq\" ) ". "VALUES "; @@ -926,7 +926,7 @@ function sql_files ( $out_dir ) EOD; - for ( $i=0, $ien=count($json) ; $i<$ien ; $i++ ) { + for ( $i=0, $iLen=count($json) ; $i<$iLen ; $i++ ) { $str .= "INSERT INTO \"datatables_demo\" ". "( \"first_name\", \"last_name\", \"age\", \"position\", \"salary\", \"start_date\", \"extn\", \"email\", \"office\", \"seq\" ) ". "VALUES "; @@ -971,7 +971,7 @@ function json_files ( $out_dir ) // Plain arrays $out = []; - for ( $i=0, $ien=count($json) ; $i<$ien ; $i++ ) { + for ( $i=0, $iLen=count($json) ; $i<$iLen ; $i++ ) { $out[] = [ $json[$i]['first_name'].' '.$json[$i]['last_name'], $json[$i]['position'], @@ -995,7 +995,7 @@ function json_files ( $out_dir ) // Arrays with sub objects $out = []; - for ( $i=0, $ien=count($json) ; $i<$ien ; $i++ ) { + for ( $i=0, $iLen=count($json) ; $i<$iLen ; $i++ ) { $out[] = [ $json[$i]['first_name'].' '.$json[$i]['last_name'], 'hr' => [ @@ -1017,7 +1017,7 @@ function json_files ( $out_dir ) // Simple object base case $out = []; - for ( $i=0, $ien=count($json) ; $i<$ien ; $i++ ) { + for ( $i=0, $iLen=count($json) ; $i<$iLen ; $i++ ) { $out[] = [ 'id' => $json[$i]['id'], 'name' => $json[$i]['first_name'] .' '. $json[$i]['last_name'], @@ -1042,7 +1042,7 @@ function json_files ( $out_dir ) // Objects with sub objects and arrays $out = []; - for ( $i=0, $ien=count($json) ; $i<$ien ; $i++ ) { + for ( $i=0, $iLen=count($json) ; $i<$iLen ; $i++ ) { $out[] = [ 'name' => $json[$i]['first_name'].' '.$json[$i]['last_name'], 'hr' => [ @@ -1064,7 +1064,7 @@ function json_files ( $out_dir ) // Salary without formatting $out = []; - for ( $i=0, $ien=count($json) ; $i<$ien ; $i++ ) { + for ( $i=0, $iLen=count($json) ; $i<$iLen ; $i++ ) { $country = $json[$i]['office']; if ( $country === 'Singapore' ) { $country = 'Argentina'; @@ -1086,7 +1086,7 @@ function json_files ( $out_dir ) // Objects with sub objects $out = []; - for ( $i=0, $ien=count($json) ; $i<$ien ; $i++ ) { + for ( $i=0, $iLen=count($json) ; $i<$iLen ; $i++ ) { $out[] = [ 'name' => [ $json[$i]['last_name'], $json[$i]['first_name'] ], 'hr' => [ @@ -1106,7 +1106,7 @@ function json_files ( $out_dir ) // Orthogonal date data $out = []; - for ( $i=0, $ien=count($json) ; $i<$ien ; $i++ ) { + for ( $i=0, $iLen=count($json) ; $i<$iLen ; $i++ ) { $t = strtotime( $json[$i]['start_date'] ); $out[] = [ 'name' => $json[$i]['first_name'] .' '. $json[$i]['last_name'], @@ -1240,7 +1240,7 @@ function tidy_structure ( &$examples, $order ) function dump_structure( &$examples, $pre="" ) { - for ( $i=0, $ien=count($examples) ; $i<$ien ; $i++ ) { + for ( $i=0, $iLen=count($examples) ; $i<$iLen ; $i++ ) { $example = $examples[$i]; if ( $example['type'] === 'dir' ) { @@ -1256,7 +1256,7 @@ function dump_structure( &$examples, $pre="" ) function process_structure ( &$examples, $toc='', $cat='' ) { - for ( $i=0, $ien=count($examples) ; $i<$ien ; $i++ ) { + for ( $i=0, $iLen=count($examples) ; $i<$iLen ; $i++ ) { $example = $examples[$i]; if ( $example['type'] === 'dir' ) { @@ -1305,7 +1305,7 @@ function build_toc ( $examples, $example, $category ) // Use all examples $out = ''; - for ( $i=0, $ien=count($examples) ; $i<$ien ; $i++ ) { + for ( $i=0, $iLen=count($examples) ; $i<$iLen ; $i++ ) { if ( $examples[$i]['type'] === 'dir' && $examples[$i]['name'] !== 'private' ) { $out .= build_toc_category( $examples[$i], $example ); } @@ -1321,7 +1321,7 @@ function build_toc_category ( $category, $current=null ) $inCategory = false; $out = ''; - for ( $i=0, $ien=count($category['files']) ; $i<$ien ; $i++ ) { + for ( $i=0, $iLen=count($category['files']) ; $i<$iLen ; $i++ ) { $example = $category['files'][$i]; if ( $example['name'] !== 'index' ) { @@ -1360,7 +1360,7 @@ function build_toc_category ( $category, $current=null ) function has_files ( $files ) { - for ( $i=0, $ien=count($files) ; $i<$ien ; $i++ ) { + for ( $i=0, $iLen=count($files) ; $i<$iLen ; $i++ ) { if ( $files[$i]['type'] === 'file' ) { return true; } @@ -1376,7 +1376,7 @@ function has_files ( $files ) function toc_structure ( &$examples ) { - for ( $i=0, $ien=count($examples) ; $i<$ien ; $i++ ) { + for ( $i=0, $iLen=count($examples) ; $i<$iLen ; $i++ ) { $group = &$examples[$i]; if ( $group['type'] === 'dir' ) { diff --git a/build/include.sh b/build/include.sh index 77ffafa2d..6a9ffc957 100644 --- a/build/include.sh +++ b/build/include.sh @@ -62,7 +62,7 @@ function css_compress { echo_msg "CSS compressing $FILE.css" $SASS --no-charset --stop-on-error --style compressed $DIR/$FILE.css > $DIR/$FILE.min.css - # compressed style will add a UTF8 BOM which messes with concatination - remove it. + # compressed style will add a UTF8 BOM which messes with concatenation - remove it. sed -i '1s/^\xEF\xBB\xBF//' $DIR/$FILE.min.css echo_msg " File size: $(ls -l $DIR/$FILE.min.css | awk -F" " '{ print $5 }')" diff --git a/build/lib/DT_Example.php b/build/lib/DT_Example.php index b3f752a19..d2c56f44c 100644 --- a/build/lib/DT_Example.php +++ b/build/lib/DT_Example.php @@ -394,7 +394,7 @@ public function build_table ( $type, $idIn=null ) $a = explode('|', $type); $t = ''; - for ( $i=0, $ien=count($a) ; $i<$ien ; $i++ ) { + for ( $i=0, $iLen=count($a) ; $i<$iLen ; $i++ ) { $t .= $this->build_table( $a[$i] ); } @@ -453,7 +453,7 @@ public function build_table ( $type, $idIn=null ) } else { $cells = ''; - for ( $i=0, $ien=count($columns) ; $i<$ien ; $i++ ) { + for ( $i=0, $iLen=count($columns) ; $i<$iLen ; $i++ ) { $cells .= ''.$this->_column( $columns[$i], 'title' ).''; } $t .= ''; @@ -479,7 +479,7 @@ public function build_table ( $type, $idIn=null ) } $cells = ''; - for ( $i=0, $ien=count($columns) ; $i<$ien ; $i++ ) { + for ( $i=0, $iLen=count($columns) ; $i<$iLen ; $i++ ) { $cell = $this->_column( $columns[$i], 'data', $this->_data[$j] ); if ( strpos( $cell, '_column( $columns[$i], 'title' ).''; } $t .= ''; @@ -558,7 +558,7 @@ private function _format_libs ( $type ) $out = array(); $libs = $this->_libs[ $type ]; - for ( $i=0, $ien=count($libs) ; $i<$ien ; $i++ ) { + for ( $i=0, $iLen=count($libs) ; $i<$iLen ; $i++ ) { $file = $libs[$i]; // needs a path if ( strpos($file, '//') !== 0 && @@ -608,7 +608,7 @@ private function _resolve_xml_libs ( $framework, $type, $libs ) if ( isset( $lib['lib'] ) ) { $split_attr = explode( ' ', (string)$lib['lib'] ); - for ( $i=0, $ien=count($split_attr) ; $i<$ien ; $i++ ) { + for ( $i=0, $iLen=count($split_attr) ; $i<$iLen ; $i++ ) { $a[] = $split_attr[$i]; $this->_xml_libs[ $type ][] = $split_attr[$i]; } @@ -624,7 +624,7 @@ private function _resolve_libs ( $framework, $type, $libs ) $exampleLibs = &$this->_libs[ $type ]; $srcLibs = DT_Example::$lookup_libraries[ $type ]; - for ( $i=0, $ien=count($libs) ; $i<$ien ; $i++ ) { + for ( $i=0, $iLen=count($libs) ; $i<$iLen ; $i++ ) { $lib = $libs[$i]; if ( strpos($lib, '/') === 0 || strpos($lib, '.') === 0 ) { @@ -681,17 +681,17 @@ private function _resolve_framework_lib ( $framework, $type, $lib ) 'jquery' : 'dataTables'; - // Always include the core Javascript file. + // Always include the core JavaScript file. $out[] = $path.'/js/'.$jsBaseFilename.'.'.$filename.$min.'.js'; - // Possibly include a framework Javascript file. If the framework is + // Possibly include a framework JavaScript file. If the framework is // DataTables, then there will be no override JS file. if ( $framework !== 'dataTables' && $component['framework']['js'] ) { $out[] = $path.'/js/'.$filename.'.'.$framework.$min.'.js'; } } else if ( $type === 'css' ) { - // Possibly include a framework Javascript file. + // Possibly include a framework JavaScript file. if ( $component['framework']['css'] ) { $out[] = $path.'/css/'.$filename.'.'.$framework.$min.'.css'; } @@ -949,7 +949,7 @@ private function _libs_for_js () { Cedric Kelly - Senior Javascript Developer + Senior JavaScript Developer Edinburgh 29th Mar 12 $433,060 @@ -1010,7 +1010,7 @@ function ( $type, $row ) { return ''.$row['age'].''; } else if ( $row['age'] < 55 ) { - return ''.$row['age'].''; + return ''.$row['age'].''; } return ''.$row['age'].''; }, diff --git a/build/lib/DT_Markdown.php b/build/lib/DT_Markdown.php index f072410a7..60836aa63 100644 --- a/build/lib/DT_Markdown.php +++ b/build/lib/DT_Markdown.php @@ -15,12 +15,12 @@ * paths) */ -function DT_Markdown($text, $default_claases=array(), $truncateWhiteSpace=false){ +function DT_Markdown($text, $default_classes=array(), $truncateWhiteSpace=false){ if ( $truncateWhiteSpace ) { $text = DT_Markdown_Parser::truncateWhiteSpace( $text ); } - $parser = new DT_Markdown_Parser($default_claases); + $parser = new DT_Markdown_Parser($default_classes); return $parser->transform($text); } @@ -45,7 +45,7 @@ static function truncateWhiteSpace ( $str ) // Remove the same amount of white space for each line if ( $match && count($match) ) { - for ( $i=0, $ien=count($a) ; $i<$ien ; $i++ ) { + for ( $i=0, $iLen=count($a) ; $i<$iLen ; $i++ ) { $a[$i] = preg_replace( '/'.$match[0].'/', '', $a[$i], 1 ); } } @@ -112,7 +112,7 @@ function _docLink ( $software, $type, $item, $html ) $a = explode('|', $item); $s = array(); - for ( $i=0, $ien=count($a) ; $i<$ien ; $i++ ) { + for ( $i=0, $iLen=count($a) ; $i<$iLen ; $i++ ) { $s[] = self::_docLink( $software, $type, $a[$i], htmlspecialchars(trim($a[$i]), ENT_NOQUOTES) ); @@ -210,7 +210,7 @@ function _docLink ( $software, $type, $item, $html ) break; case 'js': // JS type - $lang = 'Javascript'; + $lang = 'JavaScript'; break; default: diff --git a/build/lib/markdown.php b/build/lib/markdown.php index ab53ce38c..318409783 100644 --- a/build/lib/markdown.php +++ b/build/lib/markdown.php @@ -288,7 +288,7 @@ function setup() { function teardown() { # # Called after the transformation process to clear any variable - # which may be taking up memory unnecessarly. + # which may be taking up memory unnecessarily. # $this->urls = array(); $this->titles = array(); @@ -325,7 +325,7 @@ function transform($text) { $text = $this->hashHTMLBlocks($text); # Strip any lines consisting only of spaces and tabs. - # This makes subsequent regexen easier to write, because we can + # This makes subsequent regexes easier to write, because we can # match consecutive blank lines with /\n+/ instead of something # contorted like /[ ]*\n+/ . $text = preg_replace('/^[ ]+$/m', '', $text); @@ -965,7 +965,7 @@ function doLists($text) { ); foreach ($markers_relist as $marker_re => $other_marker_re) { - # Re-usable pattern to match any entirel ul or ol list: + # Re-usable pattern to match any entire ul or ol list: $whole_list_re = ' ( # $1 = whole list ( # $2 @@ -1194,7 +1194,7 @@ function doItalicsAndBold($text) { while (1) { # - # Get prepared regular expression for seraching emphasis tokens + # Get prepared regular expression for searching emphasis tokens # in current context. # $token_re = $this->em_strong_prepared_relist["$em$strong"]; @@ -1352,22 +1352,22 @@ function formParagraphs($text) { # Strip leading and trailing lines: $text = preg_replace('/\A\n+|\n+\z/', '', $text); - $grafs = preg_split('/\n{2,}/', $text, -1, PREG_SPLIT_NO_EMPTY); + $paragraphs = preg_split('/\n{2,}/', $text, -1, PREG_SPLIT_NO_EMPTY); # # Wrap

tags and unhashify HTML blocks # - foreach ($grafs as $key => $value) { + foreach ($paragraphs as $key => $value) { if (!preg_match('/^B\x1A[0-9]+B$/', $value)) { # Is a paragraph. $value = $this->runSpanGamut($value); $value = preg_replace('/^([ ]*)/', "

", $value); $value .= "

"; - $grafs[$key] = $this->unhash($value); + $paragraphs[$key] = $this->unhash($value); } else { # Is a block. - # Modify elements of @grafs in-place... + # Modify elements of @paragraphs in-place... $graf = $value; $block = $this->html_hashes[$graf]; $graf = $block; @@ -1406,11 +1406,11 @@ function formParagraphs($text) { // // $graf = $div_open . "\n" . $div_content . "\n" . $div_close; // } - $grafs[$key] = $graf; + $paragraphs[$key] = $graf; } } - return implode("\n\n", $grafs); + return implode("\n\n", $paragraphs); } @@ -1622,7 +1622,7 @@ function detab($text) { # # Replace tabs with the appropriate amount of space. # - # For each line we separate the line in blocks delemited by + # For each line we separate the line in blocks delimited by # tab characters. Then we reconstruct every line by adding the # appropriate number of space between each blocks. @@ -1730,7 +1730,7 @@ function __construct() { # Extra variables used during extra transformations. var $footnotes = array(); var $footnotes_ordered = array(); - var $abbr_desciptions = array(); + var $abbr_descriptions = array(); var $abbr_word_re = ''; # Give the current footnote number. @@ -1745,7 +1745,7 @@ function setup() { $this->footnotes = array(); $this->footnotes_ordered = array(); - $this->abbr_desciptions = array(); + $this->abbr_descriptions = array(); $this->abbr_word_re = ''; $this->footnote_counter = 1; @@ -1753,7 +1753,7 @@ function setup() { if ($this->abbr_word_re) $this->abbr_word_re .= '|'; $this->abbr_word_re .= preg_quote($abbr_word); - $this->abbr_desciptions[$abbr_word] = trim($abbr_desc); + $this->abbr_descriptions[$abbr_word] = trim($abbr_desc); } } @@ -1763,7 +1763,7 @@ function teardown() { # $this->footnotes = array(); $this->footnotes_ordered = array(); - $this->abbr_desciptions = array(); + $this->abbr_descriptions = array(); $this->abbr_word_re = ''; parent::teardown(); @@ -2120,7 +2120,7 @@ function _hashHTMLBlocks_inHTML($text, $hash_method, $md_attr) { if (count($parts) < 3) { # - # End of $text reached with unbalenced tag(s). + # End of $text reached with unbalanced tag(s). # In that case, we return original text unchanged and pass the # first character as filtered to prevent an infinite loop in the # parent function. @@ -2240,7 +2240,7 @@ function doHeaders($text) { $text = preg_replace_callback( '{ (^.+?) # $1: Header text - (?:[ ]+\{\#([-_:a-zA-Z0-9]+)\})? # $2: Id attribute + (?:[ ]+\{\#([-_:a-zA-Z0-9]+)\})? # $2: ID attribute [ ]*\n(=+|-+)[ ]*\n+ # $3: Header footer }mx', array(&$this, '_doHeaders_callback_setext'), $text); @@ -2618,12 +2618,12 @@ function formParagraphs($text) { # Strip leading and trailing lines: $text = preg_replace('/\A\n+|\n+\z/', '', $text); - $grafs = preg_split('/\n{2,}/', $text, -1, PREG_SPLIT_NO_EMPTY); + $paragraphs = preg_split('/\n{2,}/', $text, -1, PREG_SPLIT_NO_EMPTY); # # Wrap

tags and unhashify HTML blocks # - foreach ($grafs as $key => $value) { + foreach ($paragraphs as $key => $value) { $value = trim($this->runSpanGamut($value)); # Check if this should be enclosed in a paragraph. @@ -2633,11 +2633,11 @@ function formParagraphs($text) { if ($is_p) { $value = "

$value

"; } - $grafs[$key] = $value; + $paragraphs[$key] = $value; } - # Join grafs in one text, then unhash HTML tags. - $text = implode("\n\n", $grafs); + # Join paragraphs in one text, then unhash HTML tags. + $text = implode("\n\n", $paragraphs); # Finish by removing any tag hashes still present in $text. $text = $this->unhash($text); @@ -2810,7 +2810,7 @@ function _stripAbbreviations_callback($matches) { if ($this->abbr_word_re) $this->abbr_word_re .= '|'; $this->abbr_word_re .= preg_quote($abbr_word); - $this->abbr_desciptions[$abbr_word] = trim($abbr_desc); + $this->abbr_descriptions[$abbr_word] = trim($abbr_desc); return ''; # String that will replace the block } @@ -2833,8 +2833,8 @@ function doAbbreviations($text) { } function _doAbbreviations_callback($matches) { $abbr = $matches[0]; - if (isset($this->abbr_desciptions[$abbr])) { - $desc = $this->abbr_desciptions[$abbr]; + if (isset($this->abbr_descriptions[$abbr])) { + $desc = $this->abbr_descriptions[$abbr]; if (empty($desc)) { return $this->hashPart("$abbr"); } else { diff --git a/build/lib/markdown_extended.php b/build/lib/markdown_extended.php index 93356d666..3380abbc7 100644 --- a/build/lib/markdown_extended.php +++ b/build/lib/markdown_extended.php @@ -2,8 +2,8 @@ require_once('markdown.php'); define( 'MARKDOWNEXTRAEXTENDED_VERSION', "0.3" ); -function MarkdownExtended($text, $default_claases = array()){ - $parser = new MarkdownExtraExtended_Parser($default_claases); +function MarkdownExtended($text, $default_classes = array()){ + $parser = new MarkdownExtraExtended_Parser($default_classes); return $parser->transform($text); } @@ -145,7 +145,7 @@ function _doFencedFigures_callback($matches) { $figure = preg_replace('/^/m', " ", $figure); # These leading spaces cause problem with
 content, 
-		# so we need to fix that - reuse blockqoute code to handle this:
+		# so we need to fix that - reuse blockquote code to handle this:
 		$figure = preg_replace_callback('{(\s*
.+?
)}sx', array(&$this, '_doBlockQuotes_callback2'), $figure); diff --git a/build/make.sh b/build/make.sh index a9850677d..f73af9ad9 100755 --- a/build/make.sh +++ b/build/make.sh @@ -343,7 +343,7 @@ function usage { - SearchPanes - StateRestore - js - Create the DataTables Javascript file + js - Create the DataTables JavaScript file serve - Run an HTTP server to allow the built examples to load diff --git a/build/templates/example.html b/build/templates/example.html index 9a657250b..0821155d6 100644 --- a/build/templates/example.html +++ b/build/templates/example.html @@ -38,7 +38,7 @@

{software} example {title}