Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stop supporting '[this]' as a comment reference. #3765

Open
wants to merge 1 commit into
base: main
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
## 8.0.10-dev

* Un-deprecate the `--resources-dir` option.
* Remove support for `[this]` as a comment reference. Referring to the
containing element can be written as `this [Foo]`, and referring to 'this'
can just be written as `` `this` ``.

## 8.0.9

Expand Down
2 changes: 1 addition & 1 deletion lib/src/dartdoc_options.dart
Original file line number Diff line number Diff line change
Expand Up @@ -572,7 +572,7 @@ abstract class DartdocOption<T extends Object?> {
U getValueAs<U>(String name, Folder dir) =>
_children[name]?.valueAt(dir) as U;

/// Apply the function [visit] to [this] and all children.
/// Apply the function [visit] to this [DartdocOption] and all children.
void traverse(void Function(DartdocOption option) visit) {
visit(this);
for (var value in _children.values) {
Expand Down
1 change: 0 additions & 1 deletion lib/src/model/container.dart
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,6 @@ abstract class Container extends ModelElement
.addEntriesIfAbsent(modelElement.parameters.generateEntries());
}
}
referenceChildren['this'] = this;
return referenceChildren;
}();

Expand Down
3 changes: 0 additions & 3 deletions test/end2end/model_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2742,9 +2742,6 @@ void main() async {
doAwesomeStuff, 'BaseForDocComments.aNonDefaultConstructor'),
equals(MatchingLinkResult(aNonDefaultConstructor)));

expect(referenceLookup(doAwesomeStuff, 'this'),
equals(MatchingLinkResult(baseForDocComments)));

expect(referenceLookup(doAwesomeStuff, 'value'),
equals(MatchingLinkResult(doAwesomeStuffParam)));

Expand Down