Skip to content

Commit c265a11

Browse files
committed
Add a note about lookbehind in RegExp
1 parent 212e7be commit c265a11

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/util/normalizeValue.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
* @api private
99
*/
1010
export const normalizeValue = (value: unknown): string => String(value)
11+
// TODO: Revert this to /\r(?!\n)|(?<!\r)\n/g when all browsers will support lookbehind in RegExp. See: https://github.com/octet-stream/form-data-encoder/issues/5
1112
.replace(/\r|\n/g, (match: string, i: number, str: string) => {
1213
if (
1314
(match === "\r" && str[i + 1] !== "\n")

0 commit comments

Comments
 (0)