Skip to content

Commit 44225eb

Browse files
committed
Make initHtmlGenerators take HtmlGeneratorContext instead
1 parent 338edd2 commit 44225eb

File tree

1 file changed

+10
-12
lines changed

1 file changed

+10
-12
lines changed

lib/src/html/html_generator.dart

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -155,30 +155,28 @@ class HtmlGeneratorOptions implements HtmlOptions {
155155
}
156156

157157
/// Initialize and setup the generators.
158-
Future<List<Generator>> initHtmlGenerators(
159-
DartdocGeneratorOptionContext config) async {
158+
Future<List<Generator>> initHtmlGenerators(HtmlGeneratorContext context) async {
160159
// TODO(jcollins-g): Rationalize based on GeneratorContext all the way down
161160
// through the generators.
162161
HtmlGeneratorOptions options = HtmlGeneratorOptions(
163-
relCanonicalPrefix: config.relCanonicalPrefix,
162+
relCanonicalPrefix: context.relCanonicalPrefix,
164163
toolVersion: dartdocVersion,
165-
faviconPath: config.favicon,
166-
prettyIndexJson: config.prettyIndexJson,
167-
templatesDir: config.templatesDir,
168-
useBaseHref: config.useBaseHref);
169-
164+
faviconPath: context.favicon,
165+
prettyIndexJson: context.prettyIndexJson,
166+
templatesDir: context.templatesDir,
167+
useBaseHref: context.useBaseHref);
170168
return [
171169
await HtmlGenerator.create(
172170
options: options,
173-
headers: config.header,
174-
footers: config.footer,
175-
footerTexts: config.footerTextPaths,
171+
headers: context.header,
172+
footers: context.footer,
173+
footerTexts: context.footerTextPaths,
176174
)
177175
];
178176
}
179177

180178
/// Dartdoc options related to html generation.
181-
mixin HtmlGeneratorContext on DartdocOptionContextBase {
179+
mixin HtmlGeneratorContext on BaseGeneratorContext {
182180
String get favicon => optionSet['favicon'].valueAt(context);
183181

184182
String get relCanonicalPrefix =>

0 commit comments

Comments
 (0)