You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This adds pretty primitive macros support.
Usage:
You define the template first:
/// {@template foo}
/// Some content
/// {@endtemplate}
Then you use it like:
/// Some stuff
/// {@macro foo}
/// More stuff
and it will be displayed as:
/// Some stuff
/// Some content
/// More stuff
You can define the template pretty much in any documentable symbol
comments. So, after we build a `Package` object, we go through all the
comments documentation of all the model elements of the package, and
build the index of macros. It's still quite fast, and doesn't increase
the build times e.g. of the Flutter docs dramatically.
So, after that, when we actually build HTML pages, we already have the
index with templates in `Package`, so we can replace `{@macros` entries
with the corresponding contents from `{@template`
0 commit comments