Add missing links to warnidf function

This commit is contained in:
irkode 2024-04-07 16:55:35 +03:00 committed by GitHub
parent c9551d4337
commit 62df9bd733
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 5 additions and 0 deletions

View File

@ -22,6 +22,8 @@ The `warnf` function evaluates the format string, then prints the result to the
{{ warnf "The %q shortcode was unable to find %s. See %s" .Name $file .Position }}
```
Use the [`warnidf`] function to allow optional suppression of specific warnings.
To prevent suppression of duplicate messages when using `warnf` for debugging, make each message unique with the [`math.Counter`] function. For example:
@ -32,3 +34,5 @@ To prevent suppression of duplicate messages when using `warnf` for debugging, m
```
[`math.Counter`]: /functions/math/counter/
[`warnidf`]: /functions/fmt/warnidf/

View File

@ -12,6 +12,7 @@ functions_fmt_logging:
- /functions/fmt/errorf
- /functions/fmt/erroridf
- /functions/fmt/warnf
- /functions/fmt/warnidf
functions_images_no_filters:
- /functions/images/filter
- /functions/images/config