Skip to content

Commit 5e4676b

Browse files
committed
Make initHtmlGenerators take HtmlGeneratorContext instead
1 parent 1035a97 commit 5e4676b

File tree

1 file changed

+9
-10
lines changed

1 file changed

+9
-10
lines changed

lib/src/html/html_generator.dart

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -141,29 +141,28 @@ class HtmlGeneratorOptions implements HtmlOptions {
141141
}
142142

143143
/// Initialize and setup the generators.
144-
Future<List<Generator>> initHtmlGenerators(
145-
DartdocGeneratorOptionContext config) async {
144+
Future<List<Generator>> initHtmlGenerators(HtmlGeneratorContext context) async {
146145
// TODO(jcollins-g): Rationalize based on GeneratorContext all the way down
147146
// through the generators.
148147
HtmlGeneratorOptions options = HtmlGeneratorOptions(
149-
relCanonicalPrefix: config.relCanonicalPrefix,
148+
relCanonicalPrefix: context.relCanonicalPrefix,
150149
toolVersion: dartdocVersion,
151-
faviconPath: config.favicon,
152-
prettyIndexJson: config.prettyIndexJson,
153-
templatesDir: config.templatesDir);
150+
faviconPath: context.favicon,
151+
prettyIndexJson: context.prettyIndexJson,
152+
templatesDir: context.templatesDir);
154153

155154
return [
156155
await HtmlGenerator.create(
157156
options: options,
158-
headers: config.header,
159-
footers: config.footer,
160-
footerTexts: config.footerTextPaths,
157+
headers: context.header,
158+
footers: context.footer,
159+
footerTexts: context.footerTextPaths,
161160
)
162161
];
163162
}
164163

165164
/// Dartdoc options related to html generation.
166-
mixin HtmlGeneratorContext on DartdocOptionContextBase {
165+
mixin HtmlGeneratorContext on BaseGeneratorContext {
167166
String get favicon => optionSet['favicon'].valueAt(context);
168167

169168
String get relCanonicalPrefix =>

0 commit comments

Comments
 (0)