Skip to content

Commit 26670e6

Browse files
committed
Prettier
1 parent 6ef1d9b commit 26670e6

1 file changed

Lines changed: 14 additions & 8 deletions

File tree

src/features/route/RoutePopup.jsx

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -389,16 +389,22 @@ export function RoutePopup({ end, inline = false, ...props }) {
389389

390390
function DownloadRouteGPX({ route }) {
391391
const escapeXml = (value = '') =>
392-
String(value).replace(/[<>&'"]/g, (c) => ({
393-
'<': '&lt;',
394-
'>': '&gt;',
395-
'&': '&amp;',
396-
"'": '&apos;',
397-
'"': '&quot;',
398-
}[c]))
392+
String(value).replace(
393+
/[<>&'"]/g,
394+
(c) =>
395+
({
396+
'<': '&lt;',
397+
'>': '&gt;',
398+
'&': '&amp;',
399+
"'": '&apos;',
400+
'"': '&quot;',
401+
})[c],
402+
)
399403

400404
const sanitizeFilename = (name = '') =>
401-
String(name).replace(/[\/:*?"<>|]/g, '').slice(0, 200) || 'route'
405+
String(name)
406+
.replace(/[\/:*?"<>|]/g, '')
407+
.slice(0, 200) || 'route'
402408

403409
const GPXContent = React.useMemo(() => {
404410
if (!route.waypoints.length) {

0 commit comments

Comments
 (0)