Skip to content

Commit 1b550a4

Browse files
authored
Fix misc spelling issues (#2468)
* Fix misc spelling issues * Address review comments
1 parent 90489db commit 1b550a4

File tree

10 files changed

+25
-25
lines changed

10 files changed

+25
-25
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,7 @@ as well as available in the process environment.
374374

375375
### Injecting HTML
376376

377-
It happens rarely, but sometimes what you really need is to inject some raw HTML
377+
It rarely happens, but sometimes what you really need is to inject some raw HTML
378378
into the dartdoc output, without it being subject to Markdown processing
379379
beforehand. This can be useful when the output of an external tool is HTML, for
380380
instance. This is where the `{@inject-html}...{@end-inject-html}` tags come in.
@@ -411,7 +411,7 @@ all the used libraries, even from other packages, to the list of the documented
411411
The source linking feature in dartdoc is a little tricky to use, since pub packages do not actually
412412
include enough information to link back to source code and that's the context in which documentation
413413
is generated for the pub site. This means that for now, it must be manually specified in
414-
dartdoc_options.yaml what revision to use. It is currently recommended practice to
414+
dartdoc_options.yaml what revision to use. It is currently a recommended practice to
415415
specify a revision in dartdoc_options.yaml that points to the same revision as your public package.
416416
If you're using a documentation staging system outside of Dart's pub site, override the template and
417417
revision on the command line with the head revision number. You can use the branch name,

lib/resources/script.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ function initScrollSave() {
7777
var mainContent = document.getElementById('dartdoc-main-content');
7878
var rightSidebar = document.getElementById('dartdoc-sidebar-right');
7979

80-
// For portablility, use two different ways of attaching saveLeftScroll to events.
80+
// For portability, use two different ways of attaching saveLeftScroll to events.
8181
leftSidebar.onscroll = saveLeftScroll;
8282
leftSidebar.addEventListener("scroll", saveLeftScroll, true);
8383
mainContent.onscroll = saveMainContentScroll;

lib/src/dartdoc_options.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -730,14 +730,14 @@ class DartdocOptionFileSynth<T> extends DartdocOption<T>
730730
final T Function(DartdocSyntheticOption<T>, Folder) _compute;
731731

732732
DartdocOptionFileSynth(
733-
String name, this._compute, ResourceProvider resourceprovider,
733+
String name, this._compute, ResourceProvider resourceProvider,
734734
{bool mustExist = false,
735735
String help = '',
736736
OptionKind optionIs = OptionKind.other,
737737
bool parentDirOverridesChild,
738738
ConvertYamlToType<T> convertYamlToType})
739739
: super(name, null, help, optionIs, mustExist, convertYamlToType,
740-
resourceprovider) {
740+
resourceProvider) {
741741
_parentDirOverridesChild = parentDirOverridesChild;
742742
}
743743

lib/src/markdown_processor.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -349,7 +349,7 @@ class _MarkdownCommentReference {
349349

350350
/// [_impliedUnnamedConstructor] is memoized in [__impliedUnnamedConstructor],
351351
/// but even after it is initialized, it may be null. This bool represents the
352-
/// initializiation state.
352+
/// initialization state.
353353
bool __impliedUnnamedConstructorIsSet = false;
354354

355355
/// Returns the name of the implied unnamed constructor if there is one, or
@@ -624,14 +624,14 @@ class _MarkdownCommentReference {
624624
}
625625

626626
/// Returns the unnamed constructor for class [toConvert] or the class for
627-
/// constructor [toConvert], or just [toConvert], based on hueristics.
627+
/// constructor [toConvert], or just [toConvert], based on heuristics.
628628
///
629629
/// * If an unnamed constructor is implied in the comment reference, and
630630
/// [toConvert] is a class with the same name, the class's unnamed
631631
/// constructor is returned.
632632
/// * Otherwise, if [toConvert] is an unnamed constructor, its enclosing
633633
/// class is returned.
634-
/// * Othwerwise, [toConvert] is returned.
634+
/// * Otherwise, [toConvert] is returned.
635635
ModelElement _convertConstructors(ModelElement toConvert) {
636636
if (_impliedUnnamedConstructor != null) {
637637
if (toConvert is Class && toConvert.name == _impliedUnnamedConstructor) {

lib/src/model/dynamic.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ class Dynamic extends ModelElement {
1717
@override
1818
ModelElement get enclosingElement => throw UnsupportedError('');
1919

20-
/// And similiarly, even if someone references it directly it can have
20+
/// And similarly, even if someone references it directly it can have
2121
/// no hyperlink.
2222
@override
2323
String get href => null;

lib/src/model/never.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ class NeverType extends ModelElement {
1717
@override
1818
ModelElement get enclosingElement => throw UnsupportedError('');
1919

20-
/// And similiarly, even if someone references it directly it can have
20+
/// And similarly, even if someone references it directly it can have
2121
/// no hyperlink.
2222
@override
2323
String get href => null;

lib/src/model_utils.dart

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -140,12 +140,12 @@ bool hasPublicName(Element e) => !hasPrivateName(e);
140140

141141
/// Strip leading dartdoc comments from the given source code.
142142
String stripDartdocCommentsFromSource(String source) {
143-
var remainer = source.trimLeft();
143+
var remainder = source.trimLeft();
144144
var sanitizer = const HtmlEscape();
145-
var lineComments = remainer.startsWith('///') ||
146-
remainer.startsWith(sanitizer.convert('///'));
147-
var blockComments = remainer.startsWith('/**') ||
148-
remainer.startsWith(sanitizer.convert('/**'));
145+
var lineComments = remainder.startsWith('///') ||
146+
remainder.startsWith(sanitizer.convert('///'));
147+
var blockComments = remainder.startsWith('/**') ||
148+
remainder.startsWith(sanitizer.convert('/**'));
149149

150150
return source.split('\n').where((String line) {
151151
if (lineComments) {
@@ -171,8 +171,8 @@ String stripDartdocCommentsFromSource(String source) {
171171

172172
/// Strip the common indent from the given source fragment.
173173
String stripIndentFromSource(String source) {
174-
var remainer = source.trimLeft();
175-
var indent = source.substring(0, source.length - remainer.length);
174+
var remainder = source.trimLeft();
175+
var indent = source.substring(0, source.length - remainder.length);
176176
return source.split('\n').map((line) {
177177
line = line.trimRight();
178178
return line.startsWith(indent) ? line.substring(indent.length) : line;

test/end2end/model_special_cases_test.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// BSD-style license that can be found in the LICENSE file.
44

55
/// This test library handles checks against the model for configurations
6-
/// that require different PacakgeGraph configurations. Since those
6+
/// that require different PackageGraph configurations. Since those
77
/// take a long time to initialize, isolate them here to keep model_test
88
/// fast.
99
library dartdoc.model_special_cases_test;

test/end2end/model_test.dart

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -963,11 +963,11 @@ void main() {
963963
'<a href="${HTMLBASE_PLACEHOLDER}fake/SpecialList/operator_get.html">SpecialList.operator []</a> '));
964964
}, skip: 'https://github.com/dart-lang/dartdoc/issues/1285');
965965

966-
test('codeifies a class from the SDK', () {
966+
test('adds <code> tag to a class from the SDK', () {
967967
expect(docsAsHtml, contains('<code>String</code>'));
968968
});
969969

970-
test('codeifies a reference to its parameter', () {
970+
test('adds <code> tag to a reference to its parameter', () {
971971
expect(docsAsHtml, contains('<code>value</code>'));
972972
});
973973

@@ -2015,7 +2015,7 @@ void main() {
20152015
expect(fancyList.publicInstanceFields, hasLength(1));
20162016
});
20172017

2018-
test('get contants', () {
2018+
test('get constants', () {
20192019
expect(fancyList.publicConstantFields, hasLength(0));
20202020
});
20212021

@@ -2519,7 +2519,7 @@ String topLevelFunction(int param1, bool param2, Cool coolBeans,
25192519
expect(m1.enclosingElement.name, equals(classB.name));
25202520
});
25212521

2522-
test('overriden method', () {
2522+
test('overridden method', () {
25232523
expect(m1.overriddenElement.runtimeType.toString(), 'Method');
25242524
});
25252525

@@ -2941,7 +2941,7 @@ String topLevelFunction(int param1, bool param2, Cool coolBeans,
29412941
});
29422942

29432943
test(
2944-
'property with setter and getter and comments with asterixes do not show asterixes',
2944+
'property with setter and getter and comments with asterisks do not show asterisks',
29452945
() {
29462946
expect(sFromApple.documentationAsHtml.contains('/**'), isFalse);
29472947
});
@@ -3882,7 +3882,7 @@ String topLevelFunction(int param1, bool param2, Cool coolBeans,
38823882
});
38833883

38843884
group('Sorting by name', () {
3885-
// Order by uppercased lexical ordering for non-digits,
3885+
// Order by uppercase lexical ordering for non-digits,
38863886
// lexicographical ordering of embedded digit sequences.
38873887
var names = [
38883888
r'',

testing/test_package/lib/fake.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,7 @@ class Cool {
313313
/// A map initialization making use of optional const.
314314
const Map<int, String> myMap = {1: "hello"};
315315

316-
/// A variable initalization making use of optional new.
316+
/// A variable initialization making use of optional new.
317317
Cool aCoolVariable = Cool();
318318

319319
/// Perfect for mix-ins.

0 commit comments

Comments
 (0)