Skip to content

Commit 17baa60

Browse files
authored
Add information about macro non-scoping to readme (#1685)
1 parent 9c7737f commit 17baa60

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,11 @@ and then you can insert it via `{@macro template_name}`, like
173173
/// More comments
174174
```
175175
176+
Template definitions are currently unscoped -- if dartdoc reads a file containing a template, it can be used in anything
177+
dartdoc is currently documenting. This can lead to inconsistent behavior between runs on different
178+
packages, especially if different command lines are used for dartdoc. It is recommended to use collision-resistant
179+
naming for any macros by including the package name and/or library it is defined in within the name.
180+
176181
### Auto including dependencies
177182
178183
If `--auto-include-dependencies` flag is provided, dartdoc tries to automatically add

0 commit comments

Comments
 (0)