mirror of
https://github.com/google/styleguide.git
synced 2024-03-22 13:11:43 +08:00
Fix typos
This commit is contained in:
parent
31c830a22d
commit
18fff725af
|
@ -39,7 +39,7 @@
|
||||||
|
|
||||||
This implements title \"Function Declarations and Definitions\"
|
This implements title \"Function Declarations and Definitions\"
|
||||||
of the Google C++ Style Guide for the case where the previous
|
of the Google C++ Style Guide for the case where the previous
|
||||||
line ends with an open parenthese.
|
line ends with an open parenthesis.
|
||||||
|
|
||||||
\"Current C expression\", as per the Google Style Guide and as
|
\"Current C expression\", as per the Google Style Guide and as
|
||||||
clarified by subsequent discussions, means the whole expression
|
clarified by subsequent discussions, means the whole expression
|
||||||
|
|
|
@ -3072,7 +3072,7 @@
|
||||||
/**
|
/**
|
||||||
* Whether to cancel the event in internal capture/bubble processing.
|
* Whether to cancel the event in internal capture/bubble processing.
|
||||||
* @public {boolean}
|
* @public {boolean}
|
||||||
* @suppress {visiblity} Referencing this outside this package is strongly
|
* @suppress {visibility} Referencing this outside this package is strongly
|
||||||
* discouraged.
|
* discouraged.
|
||||||
*/
|
*/
|
||||||
goog.events.Event.prototype.propagationStopped_ = false;
|
goog.events.Event.prototype.propagationStopped_ = false;
|
||||||
|
|
|
@ -92,7 +92,7 @@ characters are used, an explanatory comment can be very helpful.</p>
|
||||||
<pre><code class="language-js prettyprint">/* Best: perfectly clear even without a comment. */
|
<pre><code class="language-js prettyprint">/* Best: perfectly clear even without a comment. */
|
||||||
const units = 'μs';
|
const units = 'μs';
|
||||||
|
|
||||||
/* Allowed: but unncessary as μ is a printable character. */
|
/* Allowed: but unnecessary as μ is a printable character. */
|
||||||
const units = '\u03bcs'; // 'μs'
|
const units = '\u03bcs'; // 'μs'
|
||||||
|
|
||||||
/* Good: use escapes for non-printable characters with a comment for clarity. */
|
/* Good: use escapes for non-printable characters with a comment for clarity. */
|
||||||
|
|
|
@ -805,8 +805,8 @@ Robert Brown
|
||||||
<p>
|
<p>
|
||||||
You should strive to keep top-level forms,
|
You should strive to keep top-level forms,
|
||||||
including comments but excluding the documentation string, of
|
including comments but excluding the documentation string, of
|
||||||
appropriate length; preferrably short. Forms extending beyond a
|
appropriate length; preferably short. Forms extending beyond a
|
||||||
single page should be rare and their use should be justfied.
|
single page should be rare and their use should be justified.
|
||||||
This applies to each of the forms in an <code>eval-when</code>,
|
This applies to each of the forms in an <code>eval-when</code>,
|
||||||
rather than to the <code>eval-when</code> itself.
|
rather than to the <code>eval-when</code> itself.
|
||||||
Additionally, <code>defpackage</code> forms may be longer,
|
Additionally, <code>defpackage</code> forms may be longer,
|
||||||
|
@ -3116,7 +3116,7 @@ Robert Brown
|
||||||
You must not use exact comparison on floating point numbers,
|
You must not use exact comparison on floating point numbers,
|
||||||
since the vague nature of floating point arithmetic
|
since the vague nature of floating point arithmetic
|
||||||
can produce little "errors" in numeric value.
|
can produce little "errors" in numeric value.
|
||||||
You should compare absolute values to a threshhold.
|
You should compare absolute values to a threshold.
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
You must use <code>=</code> to compare numbers,
|
You must use <code>=</code> to compare numbers,
|
||||||
|
|
|
@ -687,7 +687,7 @@ xmlns:fn="http://www.w3.org/2005/xpath-functions">
|
||||||
- c: the indentation of the current python block, in other words, the
|
- c: the indentation of the current python block, in other words, the
|
||||||
indentation of the first line of this block, which is the
|
indentation of the first line of this block, which is the
|
||||||
indentation of the last line we saw that ended with a colon.
|
indentation of the last line we saw that ended with a colon.
|
||||||
- d: the "total" indentation of the line, ignorng possible "Yes:" or
|
- d: the "total" indentation of the line, ignoring possible "Yes:" or
|
||||||
"No:" text on the line.
|
"No:" text on the line.
|
||||||
|
|
||||||
For example, for the last line of the following code snippet, the
|
For example, for the last line of the following code snippet, the
|
||||||
|
|
|
@ -107,7 +107,7 @@
|
||||||
<code>>=#</code> must be used for strings.
|
<code>>=#</code> must be used for strings.
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
The behavior of <code>=~</code> and friends is dependant upon the
|
The behavior of <code>=~</code> and friends is dependent upon the
|
||||||
<code>ignorecase</code> setting.
|
<code>ignorecase</code> setting.
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
|
@ -232,7 +232,7 @@
|
||||||
Loud scripts are annoying.
|
Loud scripts are annoying.
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
Message the user when an error has occured.
|
Message the user when an error has occurred.
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
Message the user when an operation which takes a long time has
|
Message the user when an operation which takes a long time has
|
||||||
|
|
|
@ -110,7 +110,7 @@
|
||||||
<STYLEPOINT title="Catching Exceptions">
|
<STYLEPOINT title="Catching Exceptions">
|
||||||
<SUMMARY>Match error codes, not error text.</SUMMARY>
|
<SUMMARY>Match error codes, not error text.</SUMMARY>
|
||||||
<BODY>
|
<BODY>
|
||||||
<p>Error text may be locale dependant.</p>
|
<p>Error text may be locale dependent.</p>
|
||||||
</BODY>
|
</BODY>
|
||||||
</STYLEPOINT>
|
</STYLEPOINT>
|
||||||
</CATEGORY>
|
</CATEGORY>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user