Skip to content

Commit

Permalink
docs: enhance documentation of idna function
Browse files Browse the repository at this point in the history
  • Loading branch information
kimdre committed Dec 9, 2024
1 parent 8c9610d commit 0ffba34
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion docs/functions/idna.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions internal/provider/idna_function.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{
Expand Down

0 comments on commit 0ffba34

Please sign in to comment.