Skip to content

Commit 8545ebd

Browse files
committed
Add docs on internals of defaultUrlTransform
Related-to GH-904.
1 parent dea7340 commit 8545ebd

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

lib/index.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -412,6 +412,10 @@ function post(tree, options) {
412412
/**
413413
* Make a URL safe.
414414
*
415+
* This follows how GitHub works.
416+
* It allows the protocols `http`, `https`, `irc`, `ircs`, `mailto`, and `xmpp`,
417+
* and URLs relative to the current protocol (such as `/something`).
418+
*
415419
* @satisfies {UrlTransform}
416420
* @param {string} value
417421
* URL.

readme.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,10 @@ React node (`ReactNode`).
242242

243243
Make a URL safe.
244244

245+
This follows how GitHub works.
246+
It allows the protocols `http`, `https`, `irc`, `ircs`, `mailto`, and `xmpp`,
247+
and URLs relative to the current protocol (such as `/something`).
248+
245249
###### Parameters
246250

247251
* `url` (`string`)

0 commit comments

Comments
 (0)