Skip to content
This repository has been archived by the owner on Apr 22, 2020. It is now read-only.

Fixing several typos in code comments #594

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -134,4 +134,4 @@

## 28 Apr 2015

* Migrated to Github
* Migrated to GitHub
6 changes: 3 additions & 3 deletions js-modules/prettify.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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*\/)';
Expand Down
2 changes: 1 addition & 1 deletion src/lang-apollo.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
* Registers a language handler for the AGC/AEA Assembly Language as described
* at http://virtualagc.googlecode.com
* <p>
* 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.
*
Expand Down
4 changes: 2 additions & 2 deletions src/lang-css.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

Expand Down
2 changes: 1 addition & 1 deletion src/lang-lasso.js
Original file line number Diff line number Diff line change
Expand Up @@ -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, '#$']
Expand Down
2 changes: 1 addition & 1 deletion src/lang-matlab.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/lang-mumps.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*/

Expand Down
2 changes: 1 addition & 1 deletion src/lang-r.js
Original file line number Diff line number Diff line change
Expand Up @@ -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]?/],
Expand Down
2 changes: 1 addition & 1 deletion src/lang-vb.js
Original file line number Diff line number Diff line change
Expand Up @@ -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],
Expand Down
2 changes: 1 addition & 1 deletion src/lang-xq.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions src/node_prettify.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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*\/)';
Expand Down
6 changes: 3 additions & 3 deletions src/prettify.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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*\/)';
Expand Down
6 changes: 3 additions & 3 deletions src/run_prettify.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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*\/)';
Expand Down
2 changes: 1 addition & 1 deletion tests/debug-ie-compat-matrix.html
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ <h2>Results</h2>
}

// Configuration we're testing.
//NOTE: IE11 no longer indentifies as MSIE in user agent string
//NOTE: IE11 no longer identifies as MSIE in user agent string
var quirksMode = document.compatMode === 'BackCompat';
var ieMajorVersionNumber = navigator.userAgent.match(/MSIE\s(\d+)/) || NaN;
if (ieMajorVersionNumber) {
Expand Down
2 changes: 1 addition & 1 deletion tests/prettify_test.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<link rel="stylesheet" type="text/css" href="test_styles.css">
<script type="text/javascript">
(function () {
// keep track of when window.onload fires, this is to make sure that we dont
// keep track of when window.onload fires, this is to make sure that we don't
// miss it as it might occur before or after dynamic scripts are loaded
var isReady = false;
window.onload = function () { isReady = true; };
Expand Down