mirror of
https://github.com/gpxstudio/gpx.studio.git
synced 2026-12-03 10:04:29 +00:00
batch of fixes
This commit is contained in:
1 parent
a67b982b1c
commit
eee76f05d4
9 files changed
+288
-66
No files matched your search
@@ -84,7 +84,11 @@ function timeElement(value: unknown): string {
|
||||
return isNaN(date.getTime()) ? '' : element('time', date.toISOString());
|
||||
}
|
||||
|
||||
/** The link of an element, or the links: the former parser gave a list when there were several. */
|
||||
function link(value: Json): string {
|
||||
if (Array.isArray(value)) {
|
||||
return value.map(link).join('');
|
||||
}
|
||||
const href = value?.attributes?.href;
|
||||
return href
|
||||
? `<link href="${escape(href).replaceAll('"', '"')}">${element('text', value.text)}</link>`
|
||||
|
||||
Reference in new issue
Block a user