Commit 71ceaf31 authored by Konstantin Schulz's avatar Konstantin Schulz
Browse files

fixed display of custom corpus citations

parent cbc23562
......@@ -186,12 +186,14 @@ export class CorpusDetailPage {
// adjust range for custom corpus
let citationLevel: string = +i === 0 ? this.corpusProvider.currentCorpus.citation_level_1 : this.corpusProvider.currentCorpus.citation_level_2;
let relevantStartCitation: Citation = this.corpusProvider.currentCitations.find(x => x.level === citationLevel && x.label === this.corpusProvider.currentTextRange.start[+i]);
this.corpusProvider.currentTextRange.start[+i] = relevantStartCitation.value.toString();
let relevantEndCitation: Citation = this.corpusProvider.currentCitations.find(x => x.level === citationLevel && x.label === this.corpusProvider.currentTextRange.end[+i]);
this.corpusProvider.currentTextRange.end[+i] = relevantEndCitation.value.toString();
newUrnStart += (newUrnStart ? "." : "") + relevantStartCitation.value.toString();
newUrnEnd += (newUrnEnd ? "." : "") + relevantEndCitation.value.toString();
}
else {
newUrnStart += (newUrnStart ? "." : "") + this.corpusProvider.currentTextRange.start[+i];
newUrnEnd += (newUrnEnd ? "." : "") + this.corpusProvider.currentTextRange.end[+i];
}
newUrnStart += (newUrnStart ? "." : "") + this.corpusProvider.currentTextRange.start[+i];
newUrnEnd += (newUrnEnd ? "." : "") + this.corpusProvider.currentTextRange.end[+i];
}
// if (this.corpusProvider.currentTextRange.end[+i]) {
// // remove the other newUrnEnd append line above if you uncomment this one
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment