mirror of
https://github.com/PeWu/topola-viewer.git
synced 2026-03-13 02:53:44 +00:00
WikiTree: Handle last nams with spaces
This commit is contained in:
@@ -383,6 +383,8 @@ function parseDate(date: string, dataStatus?: string) {
|
|||||||
function buildGedcom(indis: JsonIndi[]): GedcomData {
|
function buildGedcom(indis: JsonIndi[]): GedcomData {
|
||||||
const gedcomIndis: {[key: string]: GedcomEntry} = {};
|
const gedcomIndis: {[key: string]: GedcomEntry} = {};
|
||||||
indis.forEach((indi) => {
|
indis.forEach((indi) => {
|
||||||
|
// WikiTree URLs replace spaces with underscores.
|
||||||
|
const escapedId = indi.id.replace(' ', '_');
|
||||||
gedcomIndis[indi.id] = {
|
gedcomIndis[indi.id] = {
|
||||||
level: 0,
|
level: 0,
|
||||||
pointer: `@${indi.id}@`,
|
pointer: `@${indi.id}@`,
|
||||||
@@ -400,7 +402,7 @@ function buildGedcom(indis: JsonIndi[]): GedcomData {
|
|||||||
level: 1,
|
level: 1,
|
||||||
pointer: '',
|
pointer: '',
|
||||||
tag: 'WWW',
|
tag: 'WWW',
|
||||||
data: `https://www.wikitree.com/wiki/${indi.id}`,
|
data: `https://www.wikitree.com/wiki/${escapedId}`,
|
||||||
tree: [],
|
tree: [],
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
|||||||
Reference in New Issue
Block a user