Skip to content

Commit 1edc247

Browse files
authored
Avoid [this] in Dartdoc comments (#2273)
Dartdoc broke this in dart-lang/dartdoc#3765.
1 parent a164889 commit 1edc247

21 files changed

+74
-74
lines changed

lib/src/ast/css/modifiable/node.dart

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ abstract base class ModifiableCssNode extends CssNode {
1717
ModifiableCssParentNode? get parent => _parent;
1818
ModifiableCssParentNode? _parent;
1919

20-
/// The index of [this] in `parent.children`.
20+
/// The index of `this` in `parent.children`.
2121
///
2222
/// This makes [remove] more efficient.
2323
int? _indexInParent;
@@ -33,7 +33,7 @@ abstract base class ModifiableCssNode extends CssNode {
3333

3434
T accept<T>(ModifiableCssVisitor<T> visitor);
3535

36-
/// Removes [this] from [parent]'s child list.
36+
/// Removes `this` from [parent]'s child list.
3737
///
3838
/// Throws a [StateError] if [parent] is `null`.
3939
void remove() {
@@ -65,10 +65,10 @@ abstract base class ModifiableCssParentNode extends ModifiableCssNode
6565
: _children = children,
6666
children = UnmodifiableListView(children);
6767

68-
/// Returns whether [this] is equal to [other], ignoring their child nodes.
68+
/// Returns whether `this` is equal to [other], ignoring their child nodes.
6969
bool equalsIgnoringChildren(ModifiableCssNode other);
7070

71-
/// Returns a copy of [this] with an empty [children] list.
71+
/// Returns a copy of `this` with an empty [children] list.
7272
///
7373
/// This is *not* a deep copy. If other parts of this node are modifiable,
7474
/// they are shared between the new and old nodes.

lib/src/ast/sass/at_root_query.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ final class AtRootQuery {
6161
{Object? url, Logger? logger, InterpolationMap? interpolationMap}) =>
6262
AtRootQueryParser(contents, url: url, logger: logger).parse();
6363

64-
/// Returns whether [this] excludes [node].
64+
/// Returns whether `this` excludes [node].
6565
///
6666
/// @nodoc
6767
@internal
@@ -76,6 +76,6 @@ final class AtRootQuery {
7676
};
7777
}
7878

79-
/// Returns whether [this] excludes an at-rule with the given [name].
79+
/// Returns whether `this` excludes an at-rule with the given [name].
8080
bool excludesName(String name) => (_all || names.contains(name)) != include;
8181
}

lib/src/ast/sass/expression/binary_operation.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -153,13 +153,13 @@ enum BinaryOperator {
153153
/// The modulo operator, `%`.
154154
modulo('modulo', '%', 6);
155155

156-
/// The English name of [this].
156+
/// The English name of `this`.
157157
final String name;
158158

159-
/// The Sass syntax for [this].
159+
/// The Sass syntax for `this`.
160160
final String operator;
161161

162-
/// The precedence of [this].
162+
/// The precedence of `this`.
163163
///
164164
/// An operator with higher precedence binds tighter.
165165
final int precedence;

lib/src/ast/sass/expression/list.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ final class ListExpression implements Expression {
5858
return buffer.toString();
5959
}
6060

61-
/// Returns whether [expression], contained in [this], needs parentheses when
61+
/// Returns whether [expression], contained in `this`, needs parentheses when
6262
/// printed as Sass source.
6363
bool _elementNeedsParens(Expression expression) => switch (expression) {
6464
ListExpression(

lib/src/ast/sass/expression/string.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ final class StringExpression implements Expression {
2323
/// included.
2424
final Interpolation text;
2525

26-
/// Whether [this] has quotes.
26+
/// Whether `this` has quotes.
2727
final bool hasQuotes;
2828

2929
FileSpan get span => text.span;

lib/src/ast/sass/expression/unary_operation.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,10 +63,10 @@ enum UnaryOperator {
6363
/// The boolean negation operator, `not`.
6464
not('not', 'not');
6565

66-
/// The English name of [this].
66+
/// The English name of `this`.
6767
final String name;
6868

69-
/// The Sass syntax for [this].
69+
/// The Sass syntax for `this`.
7070
final String operator;
7171

7272
const UnaryOperator(this.name, this.operator);

lib/src/ast/selector.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ abstract base class Selector implements AstNode {
8383

8484
Selector(this.span);
8585

86-
/// Prints a warning if [this] is a bogus selector.
86+
/// Prints a warning if `this` is a bogus selector.
8787
///
8888
/// This may only be called from within a custom Sass function. This will
8989
/// throw a [SassException] in Dart Sass 2.0.0.

lib/src/ast/selector/list.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,9 +96,9 @@ final class SelectorList extends Selector {
9696
return contents.isEmpty ? null : SelectorList(contents, span);
9797
}
9898

99-
/// Returns a new selector list that represents [this] nested within [parent].
99+
/// Returns a new selector list that represents `this` nested within [parent].
100100
///
101-
/// By default, this replaces [ParentSelector]s in [this] with [parent]. If
101+
/// By default, this replaces [ParentSelector]s in `this` with [parent]. If
102102
/// [preserveParentSelectors] is true, this instead preserves those selectors
103103
/// as parent selectors.
104104
///

lib/src/ast/selector/pseudo.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ final class PseudoSelector extends SimpleSelector {
174174
for (var simple in compound) {
175175
if (simple case PseudoSelector(isElement: true)) {
176176
// A given compound selector may only contain one pseudo element. If
177-
// [compound] has a different one than [this], unification fails.
177+
// [compound] has a different one than `this`, unification fails.
178178
if (isElement) return null;
179179

180180
// Otherwise, this is a pseudo selector and should come before pseudo

lib/src/ast/selector/simple.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ abstract base class SimpleSelector extends Selector {
5959
url: url, logger: logger, allowParent: allowParent)
6060
.parseSimpleSelector();
6161

62-
/// Returns a new [SimpleSelector] based on [this], as though it had been
62+
/// Returns a new [SimpleSelector] based on `this`, as though it had been
6363
/// written with [suffix] at the end.
6464
///
6565
/// Assumes [suffix] is a valid identifier suffix. If this wouldn't produce a

0 commit comments

Comments
 (0)