diff --git a/app/db/src/app/common/bible-reference.ts b/app/db/src/app/common/bible-reference.ts index 74406c6a..5851602b 100644 --- a/app/db/src/app/common/bible-reference.ts +++ b/app/db/src/app/common/bible-reference.ts @@ -1912,11 +1912,11 @@ export class BibleReference { chapter: number | string, vs: number | string ) { - return `${book};${chapter};${vs}`; + return `${book}:${chapter}:${vs}`; } public static makePassageFromReferenceKey(referenceKey: string) { - const keyArray = referenceKey.split(';'); + const keyArray = referenceKey.split(':'); const book = BibleReference.bookName(parseInt(keyArray[0], 10)).name; return new BibleReference(`${book} ${keyArray[1]}:${keyArray[2]}`); } diff --git a/app/db/src/app/models/app-state.ts b/app/db/src/app/models/app-state.ts index 27f223ca..ca47e325 100644 --- a/app/db/src/app/models/app-state.ts +++ b/app/db/src/app/models/app-state.ts @@ -128,13 +128,13 @@ export interface StrongsDefinitionPart { export interface StrongsCrossReference { readonly id: string; // strongs id H1|G1 readonly t: string; // strongs testament grk|heb - readonly d: string; // strongs word/data Aaron {ah-ar-ohn'} + readonly d: string; // strongs word/data definition Aaron {ah-ar-ohn'} readonly ss: readonly [ { - readonly w: string; + readonly w: string; // translated word readonly rs: readonly [ { - readonly r: string; + readonly r: string; // reference } ]; } diff --git a/app/db/src/app/services/app.service.ts b/app/db/src/app/services/app.service.ts index 9867e6c7..ddcb6569 100644 --- a/app/db/src/app/services/app.service.ts +++ b/app/db/src/app/services/app.service.ts @@ -296,7 +296,22 @@ export class AppService extends createStateService(reducer, initialState) { .toPromise(); for (const cr of d) { if (cr.id.toUpperCase() === result.prefix + result.sn) { - result.crossrefs = cr; + result.crossrefs = { + id: cr.id, // strongs id H1|G1 + t: cr.t, // strongs testament grk|heb + d: cr.d, // strongs word/data definition Aaron {ah-ar-ohn'} + ss: cr.ss.map((ss) => { + return { + w: ss.w, // translated word + rs: ss.rs.map((rs) => { + return { + r: rs.r.split(';').join(':'), // fix the reference... + }; + }), + }; + }), + }; + break; } } @@ -724,16 +739,7 @@ export class AppService extends createStateService(reducer, initialState) { return; } // find the right word - const refs = r - .filter((o) => o.w === query) - // you used the wrong delimiter here... *sigh* its ;'s in all the other things. - .map((o) => { - return { - ...o, - r: o.r.map((ref) => ref.replace(':', ';')), - }; - }); - + const refs = r.filter((o) => o.w === query); if (refs.length > 0) { return refs[0].r; } else {