From 62df9bd733f60f5f03c273aa0a58b9014c92fcf0 Mon Sep 17 00:00:00 2001 From: irkode Date: Sun, 7 Apr 2024 16:55:35 +0300 Subject: [PATCH] Add missing links to warnidf function --- content/en/functions/fmt/Warnf.md | 4 ++++ data/page_filters.yaml | 1 + 2 files changed, 5 insertions(+) diff --git a/content/en/functions/fmt/Warnf.md b/content/en/functions/fmt/Warnf.md index 6b3547553..f4fa22474 100644 --- a/content/en/functions/fmt/Warnf.md +++ b/content/en/functions/fmt/Warnf.md @@ -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/ diff --git a/data/page_filters.yaml b/data/page_filters.yaml index e4a9ee37a..a4969e9b7 100644 --- a/data/page_filters.yaml +++ b/data/page_filters.yaml @@ -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