Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(snippets): punycode #246

Closed
wants to merge 2 commits into from
Closed

docs(snippets): punycode #246

wants to merge 2 commits into from

Conversation

EdamAme-x
Copy link
Contributor

as title

@yusukebe
Copy link
Member

@EdamAme-x

Have you checked by launching the website app locally?

You should modify .vitepress/config.ts.

@EdamAme-x
Copy link
Contributor Author

sry @yusukebe

@@ -138,6 +138,10 @@ const sidebarsSnippets = (): DefaultTheme.SidebarItem[] => [
text: 'Grouping routes for RPC',
link: '/snippets/grouping-routes-rpc',
},
{
text: 'Use Unicode for url',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

url should be URL.


this example is for who want to use **Unicode** for url.

Currently, `c.redirect` and anyone do not support **Unicode**.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do not break lines within a paragraph.

console.log(url) // https://xn--4v8h.com
```

`c.redirect(new URL("https://🔥.com").href)`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this necessary?

`c.redirect("https://🔥.com")` throw Error.
`https://🔥.com` is expressed like `https://xn--4v8h.com` in **Punycode**.

You should conversion **Punycode** from Unicode.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

conversion should be convert.


You should conversion **Punycode** from Unicode.
There are many such libraries, but you do not need to use them.
The **Web standard api** is sufficient.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Web Standard API is better.

@@ -0,0 +1,21 @@
### Punycode
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be # Punycode.

@yusukebe
Copy link
Member

Hi @EdamAme-x !

I've left the comments. Check them please!

@EdamAme-x EdamAme-x closed this May 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants