diff --git a/CHANGELOG.md b/CHANGELOG.md index 71df667392..927424545f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/lib/src/dartdoc_options.dart b/lib/src/dartdoc_options.dart index 237944cbc0..a529ba6b71 100644 --- a/lib/src/dartdoc_options.dart +++ b/lib/src/dartdoc_options.dart @@ -572,7 +572,7 @@ abstract class DartdocOption { U getValueAs(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) { diff --git a/lib/src/model/container.dart b/lib/src/model/container.dart index e4bd324ba6..88def839d6 100644 --- a/lib/src/model/container.dart +++ b/lib/src/model/container.dart @@ -242,7 +242,6 @@ abstract class Container extends ModelElement .addEntriesIfAbsent(modelElement.parameters.generateEntries()); } } - referenceChildren['this'] = this; return referenceChildren; }(); diff --git a/test/end2end/model_test.dart b/test/end2end/model_test.dart index bd4e326290..62d2882c54 100644 --- a/test/end2end/model_test.dart +++ b/test/end2end/model_test.dart @@ -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)));