Skip to content

Commit

Permalink
Ensure link is CTRL-clickable
Browse files Browse the repository at this point in the history
Some UIs automatically linkify the link. However, a trailing `.` is included in the link.
This ensures the link is separated by whitespace.
  • Loading branch information
eps1lon committed Apr 12, 2024
1 parent 725ae27 commit 93359e4
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/__tests__/render.js
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ describe('render API', () => {
expect(() => {
render(<div />, {legacyRoot: true})
}).toThrowErrorMatchingInlineSnapshot(
`\`legacyRoot: true\` is not supported in this version of React. If your app runs React 19 or later, you should remove this flag. If your app runs React 18 or earlier, and you need help with upgrading your app, visit https://react.dev/blog/2022/03/08/react-18-upgrade-guide.`,
`\`legacyRoot: true\` is not supported in this version of React. If your app runs React 19 or later, you should remove this flag. If your app runs React 18 or earlier, visit https://react.dev/blog/2022/03/08/react-18-upgrade-guide for upgrade instructions.`,
)
})

Expand All @@ -259,7 +259,7 @@ describe('render API', () => {
expect(() => {
render(ui, {container, hydrate: true, legacyRoot: true})
}).toThrowErrorMatchingInlineSnapshot(
`\`legacyRoot: true\` is not supported in this version of React. If your app runs React 19 or later, you should remove this flag. If your app runs React 18 or earlier, and you need help with upgrading your app, visit https://react.dev/blog/2022/03/08/react-18-upgrade-guide.`,
`\`legacyRoot: true\` is not supported in this version of React. If your app runs React 19 or later, you should remove this flag. If your app runs React 18 or earlier, visit https://react.dev/blog/2022/03/08/react-18-upgrade-guide for upgrade instructions.`,
)
})
})
2 changes: 1 addition & 1 deletion src/__tests__/renderHook.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,6 @@ testGateReact19('legacyRoot throws', () => {
},
).result
}).toThrowErrorMatchingInlineSnapshot(
`\`legacyRoot: true\` is not supported in this version of React. If your app runs React 19 or later, you should remove this flag. If your app runs React 18 or earlier, and you need help with upgrading your app, visit https://react.dev/blog/2022/03/08/react-18-upgrade-guide.`,
`\`legacyRoot: true\` is not supported in this version of React. If your app runs React 19 or later, you should remove this flag. If your app runs React 18 or earlier, visit https://react.dev/blog/2022/03/08/react-18-upgrade-guide for upgrade instructions.`,
)
})
4 changes: 2 additions & 2 deletions src/pure.js
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ function render(
const error = new Error(
'`legacyRoot: true` is not supported in this version of React. ' +
'If your app runs React 19 or later, you should remove this flag. ' +
'If your app runs React 18 or earlier, and you need help with upgrading your app, visit https://react.dev/blog/2022/03/08/react-18-upgrade-guide.',
'If your app runs React 18 or earlier, visit https://react.dev/blog/2022/03/08/react-18-upgrade-guide for upgrade instructions.',
)
Error.captureStackTrace(error, render)
throw error
Expand Down Expand Up @@ -278,7 +278,7 @@ function renderHook(renderCallback, options = {}) {
const error = new Error(
'`legacyRoot: true` is not supported in this version of React. ' +
'If your app runs React 19 or later, you should remove this flag. ' +
'If your app runs React 18 or earlier, and you need help with upgrading your app, visit https://react.dev/blog/2022/03/08/react-18-upgrade-guide.',
'If your app runs React 18 or earlier, visit https://react.dev/blog/2022/03/08/react-18-upgrade-guide for upgrade instructions.',
)
Error.captureStackTrace(error, renderHook)
throw error
Expand Down

0 comments on commit 93359e4

Please sign in to comment.