From 0ffba3433efa489de63365e2f1eb9f7592ff73ae Mon Sep 17 00:00:00 2001 From: Kim Oliver Drechsel Date: Mon, 9 Dec 2024 14:18:39 +0100 Subject: [PATCH] docs: enhance documentation of idna function --- docs/functions/idna.md | 2 +- internal/provider/idna_function.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/functions/idna.md b/docs/functions/idna.md index a0c92b8..0d3496f 100644 --- a/docs/functions/idna.md +++ b/docs/functions/idna.md @@ -8,7 +8,7 @@ description: |- # function: idna -idna converts a domain or domain label to its ASCII form. For example, `provider::hetznerdns::idna("bücher.example.com")` is "xn--bcher-kva.example.com", and `provider::hetznerdns::idna("golang")` is "golang". If an error is encountered it will return an error and a (partially) processed result. +idna converts a [IDN](https://en.wikipedia.org/wiki/Internationalized_domain_name) domain or domain label to its ASCII form (Punnycode). For example, `provider::hetznerdns::idna("bücher.example.com")` is "xn--bcher-kva.example.com", and `provider::hetznerdns::idna("golang")` is "golang". If an error is encountered it will return an error and a (partially) processed result. ## Example Usage diff --git a/internal/provider/idna_function.go b/internal/provider/idna_function.go index ddfd8b3..51657dd 100644 --- a/internal/provider/idna_function.go +++ b/internal/provider/idna_function.go @@ -25,8 +25,8 @@ func (r idnaFunction) Metadata(_ context.Context, _ function.MetadataRequest, re func (r idnaFunction) Definition(_ context.Context, _ function.DefinitionRequest, resp *function.DefinitionResponse) { resp.Definition = function.Definition{ Summary: "idna function", - Description: "idna converts a domain or domain label to its ASCII form.", - MarkdownDescription: "idna converts a domain or domain label to its ASCII form. For example, `provider::hetznerdns::idna(\"bücher.example.com\")` is " + + Description: "idna converts a IDN domain or domain label to its ASCII form (Punnycode).", + MarkdownDescription: "idna converts a [IDN](https://en.wikipedia.org/wiki/Internationalized_domain_name) domain or domain label to its ASCII form (Punnycode). For example, `provider::hetznerdns::idna(\"bücher.example.com\")` is " + "\"xn--bcher-kva.example.com\", and `provider::hetznerdns::idna(\"golang\")` is \"golang\". " + "If an error is encountered it will return an error and a (partially) processed result.", Parameters: []function.Parameter{