diff --git a/CHANGES.md b/CHANGES.md index 7371e7c8..9ad22513 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -59,7 +59,7 @@ * Added `.mxml` extension to the markup style handler for Flex [MXML files](http://en.wikipedia.org/wiki/MXML). See issue [#37](https://github.com/google/code-prettify/issues/37). - * Added `.m` extension to the C style handler so that Objective C source files + * Added `.m` extension to the C style handler so that Objective-C source files properly highlight. See issue [#58](https://github.com/google/code-prettify/issues/58). * Changed HTML lexer to use the same embedded source mechanism as the wiki language handler, and changed to use the registered CSS handler for STYLE @@ -134,4 +134,4 @@ ## 28 Apr 2015 - * Migrated to Github + * Migrated to GitHub diff --git a/js-modules/prettify.js b/js-modules/prettify.js index 872c44b7..ae5a05c6 100644 --- a/js-modules/prettify.js +++ b/js-modules/prettify.js @@ -335,7 +335,7 @@ var prettyPrint; * recognized. * * Shortcut is an optional string of characters, any of which, if the first - * character, gurantee that this pattern and only this pattern matches. + * character, guarantee that this pattern and only this pattern matches. * * @param {Array} shortcutStylePatterns patterns that always start with * a known character. Must have a shortcut string. @@ -619,12 +619,12 @@ var prettyPrint; // preprocessor directives. // This definition of punctuation does not include # in the list of - // follow-on exclusions, so # will not be broken before if preceeded + // follow-on exclusions, so # will not be broken before if preceded // by a punctuation character. We could try to exclude # after // [|&;<>] but that doesn't seem to cause many major problems. // If that does turn out to be a problem, we should change the below // when hc is truthy to include # in the run of punctuation characters - // only when not followint [|&;<>]. + // only when not following [|&;<>]. '^.[^\\s\\w.$@\'"`/\\\\]*'; if (options['regexLiterals']) { punctuation += '(?!\s*\/)'; diff --git a/src/lang-apollo.js b/src/lang-apollo.js index 10df8cde..9cb87ee9 100644 --- a/src/lang-apollo.js +++ b/src/lang-apollo.js @@ -20,7 +20,7 @@ * Registers a language handler for the AGC/AEA Assembly Language as described * at http://virtualagc.googlecode.com *
- * This file could be used by goodle code to allow syntax highlight for + * This file could be used by Google code to allow syntax highlight for * Virtual AGC SVN repository or if you don't want to commonize * the header for the agc/aea html assembly listing. * diff --git a/src/lang-css.js b/src/lang-css.js index c6f7c36b..aa1e2b9b 100644 --- a/src/lang-css.js +++ b/src/lang-css.js @@ -46,7 +46,7 @@ // fallThroughPatterns), // [languageId0, ..., languageIdN]) -// Langugage IDs +// Language IDs // ============= // The language IDs are typically the file extensions of source files for // that language so that users can syntax highlight arbitrary files based @@ -73,7 +73,7 @@ // 1. use js-modules/combinePrefixPatterns.js to // combine all regular expressions into one -// 2. use a single global regular expresion match to extract all tokens +// 2. use a single global regular expression match to extract all tokens // 3. for each token try regular expressions in order until one matches it // and classify it using the associated style diff --git a/src/lang-lasso.js b/src/lang-lasso.js index 0df6e926..ea2be224 100644 --- a/src/lang-lasso.js +++ b/src/lang-lasso.js @@ -37,7 +37,7 @@ PR['registerLangHandler']( [PR['PR_STRING'], /^\"[^\"\\]*(?:\\[\s\S][^\"\\]*)*(?:\"|$)/, null, '"'], // ticked strings [PR['PR_STRING'], /^\`[^\`]*(?:\`|$)/, null, '`'], - // numeral as integer or hexidecimal + // numeral as integer or hexadecimal [PR['PR_LITERAL'], /^0x[\da-f]+|\d+/i, null, '0123456789'], // local or thread variables, or hashbang [PR['PR_ATTRIB_NAME'], /^[#$][a-z_][\w.]*|#\d+\b|#![ \S]+lasso9\b/i, null, '#$'] diff --git a/src/lang-matlab.js b/src/lang-matlab.js index d98c8212..ac7b349b 100644 --- a/src/lang-matlab.js +++ b/src/lang-matlab.js @@ -74,7 +74,7 @@ // identifiers: variable/function name, or a chain of variable names joined by dots (obj.method, struct.field1.field2, etc..) // valid variable names (start with letter, and contains letters, digits, and underscores). - // we match "xx.yy" as a whole so that if "xx" is plain and "yy" is not, we dont get a false positive for "yy" + // we match "xx.yy" as a whole so that if "xx" is plain and "yy" is not, we don't get a false positive for "yy" //var reIdent = '(?:[a-zA-Z][a-zA-Z0-9_]*)'; //var reIdentChain = '(?:' + reIdent + '(?:\.' + reIdent + ')*' + ')'; diff --git a/src/lang-mumps.js b/src/lang-mumps.js index 63dec6dc..c676dd02 100644 --- a/src/lang-mumps.js +++ b/src/lang-mumps.js @@ -31,7 +31,7 @@ * Known issues: * * - Currently can't distinguish between keywords and local or global variables having the same name - * for exampe SET IF="IF?" + * for example SET IF="IF?" * - m file are already used for MatLab hence using mumps. */ diff --git a/src/lang-r.js b/src/lang-r.js index e25c75f1..03752557 100644 --- a/src/lang-r.js +++ b/src/lang-r.js @@ -43,7 +43,7 @@ PR['registerLangHandler']( [ [PR['PR_COMMENT'], /^#.*/], [PR['PR_KEYWORD'], /^(?:if|else|for|while|repeat|in|next|break|return|switch|function)(?![A-Za-z0-9_.])/], - // hex numbes + // hex numbers [PR['PR_LITERAL'], /^0[xX][a-fA-F0-9]+([pP][0-9]+)?[Li]?/], // Decimal numbers [PR['PR_LITERAL'], /^[+-]?([0-9]+(\.[0-9]+)?|\.[0-9]+)([eE][+-]?[0-9]+)?[Li]?/], diff --git a/src/lang-vb.js b/src/lang-vb.js index 2159415c..936bccb7 100644 --- a/src/lang-vb.js +++ b/src/lang-vb.js @@ -54,7 +54,7 @@ PR['registerLangHandler']( // A boolean, numeric, or date literal. [PR['PR_LITERAL'], /^(?:True\b|False\b|Nothing\b|\d+(?:E[+\-]?\d+[FRD]?|[FRDSIL])?|(?:&H[0-9A-F]+|&O[0-7]+)[SIL]?|\d*\.\d+(?:E[+\-]?\d+)?[FRD]?|#\s+(?:\d+[\-\/]\d+[\-\/]\d+(?:\s+\d+:\d+(?::\d+)?(\s*(?:AM|PM))?)?|\d+:\d+(?::\d+)?(\s*(?:AM|PM))?)\s+#)/i], - // An identifier. Keywords can be turned into identifers + // An identifier. Keywords can be turned into identifiers // with square brackets, and there may be optional type // characters after a normal identifier in square brackets. [PR['PR_PLAIN'], /^(?:(?:[a-z]|_\w)\w*(?:\[[%&@!#]+\])?|\[(?:[a-z]|_\w)\w*\])/i], diff --git a/src/lang-xq.js b/src/lang-xq.js index ce3cb644..0862ceec 100644 --- a/src/lang-xq.js +++ b/src/lang-xq.js @@ -32,7 +32,7 @@ (function () { // Falls back to plain for stylesheets that don't style fun. var PR_FUNCTION = 'fun pln'; -// Falls back to plaiin for stylesheets that don't style var. +// Falls back to plain for stylesheets that don't style var. var PR_VARIABLE = 'var pln'; PR['registerLangHandler']( diff --git a/src/node_prettify.js b/src/node_prettify.js index df8d0266..b87ea408 100644 --- a/src/node_prettify.js +++ b/src/node_prettify.js @@ -695,7 +695,7 @@ var prettyPrint; * recognized. * * Shortcut is an optional string of characters, any of which, if the first - * character, gurantee that this pattern and only this pattern matches. + * character, guarantee that this pattern and only this pattern matches. * * @param {Array} shortcutStylePatterns patterns that always start with * a known character. Must have a shortcut string. @@ -979,12 +979,12 @@ var prettyPrint; // preprocessor directives. // This definition of punctuation does not include # in the list of - // follow-on exclusions, so # will not be broken before if preceeded + // follow-on exclusions, so # will not be broken before if preceded // by a punctuation character. We could try to exclude # after // [|&;<>] but that doesn't seem to cause many major problems. // If that does turn out to be a problem, we should change the below // when hc is truthy to include # in the run of punctuation characters - // only when not followint [|&;<>]. + // only when not following [|&;<>]. '^.[^\\s\\w.$@\'"`/\\\\]*'; if (options['regexLiterals']) { punctuation += '(?!\s*\/)'; diff --git a/src/prettify.js b/src/prettify.js index 7080ec7b..0675d8cd 100644 --- a/src/prettify.js +++ b/src/prettify.js @@ -743,7 +743,7 @@ var prettyPrint; * recognized. * * Shortcut is an optional string of characters, any of which, if the first - * character, gurantee that this pattern and only this pattern matches. + * character, guarantee that this pattern and only this pattern matches. * * @param {Array} shortcutStylePatterns patterns that always start with * a known character. Must have a shortcut string. @@ -1027,12 +1027,12 @@ var prettyPrint; // preprocessor directives. // This definition of punctuation does not include # in the list of - // follow-on exclusions, so # will not be broken before if preceeded + // follow-on exclusions, so # will not be broken before if preceded // by a punctuation character. We could try to exclude # after // [|&;<>] but that doesn't seem to cause many major problems. // If that does turn out to be a problem, we should change the below // when hc is truthy to include # in the run of punctuation characters - // only when not followint [|&;<>]. + // only when not following [|&;<>]. '^.[^\\s\\w.$@\'"`/\\\\]*'; if (options['regexLiterals']) { punctuation += '(?!\s*\/)'; diff --git a/src/run_prettify.js b/src/run_prettify.js index 4ae471ab..e4defd37 100644 --- a/src/run_prettify.js +++ b/src/run_prettify.js @@ -972,7 +972,7 @@ var IN_GLOBAL_SCOPE = false; * recognized. * * Shortcut is an optional string of characters, any of which, if the first - * character, gurantee that this pattern and only this pattern matches. + * character, guarantee that this pattern and only this pattern matches. * * @param {Array} shortcutStylePatterns patterns that always start with * a known character. Must have a shortcut string. @@ -1256,12 +1256,12 @@ var IN_GLOBAL_SCOPE = false; // preprocessor directives. // This definition of punctuation does not include # in the list of - // follow-on exclusions, so # will not be broken before if preceeded + // follow-on exclusions, so # will not be broken before if preceded // by a punctuation character. We could try to exclude # after // [|&;<>] but that doesn't seem to cause many major problems. // If that does turn out to be a problem, we should change the below // when hc is truthy to include # in the run of punctuation characters - // only when not followint [|&;<>]. + // only when not following [|&;<>]. '^.[^\\s\\w.$@\'"`/\\\\]*'; if (options['regexLiterals']) { punctuation += '(?!\s*\/)'; diff --git a/tests/debug-ie-compat-matrix.html b/tests/debug-ie-compat-matrix.html index caa58ae4..85d2b406 100644 --- a/tests/debug-ie-compat-matrix.html +++ b/tests/debug-ie-compat-matrix.html @@ -69,7 +69,7 @@