From 2721f2b8abab1c626622556af5090c0444f5f112 Mon Sep 17 00:00:00 2001 From: Francesco Giudici Date: Fri, 30 Aug 2024 08:53:55 +0200 Subject: [PATCH] label templates: fix sanitization section (#369) invalid chars are substituted with an hyphen, not an underscore: fix the documentation Fixes #365 Signed-off-by: Francesco Giudici --- docs/label-templates.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/docs/label-templates.md b/docs/label-templates.md index 314ea48c7..a249c2333 100644 --- a/docs/label-templates.md +++ b/docs/label-templates.md @@ -64,11 +64,12 @@ Template variables can be mixed with static text to form the actual labels assig Once the label template value has been rendered accordingly to the included [label template variables](#label-template-variables), the resulting value is `sanitized` before being assigned to the resulting label. **The `sanitization` enforce the label value to only contain letters (capitalized or not), numbers and the hyphen (`-`), point (`.`) and underscore (`_`) characters**: -all the characters not included are substituted with an underscore. +all the characters not included are substituted with an hyphen. -If an underscore is at the beginning or at the end of the label value, it is dropped. +Any character at the beginning and at the end of the label value must be a letter or a number. +If it is not, it is dropped. -Two consecutive underscores are replaced with one. +Two consecutive hyphens are replaced with one. :::note Rendering Example * Template label with not allowed chars sanitization: