Consistent with the AngJS flat text MARC editor, use '$' as the subfield
delimiter instead of the default '‡'.
Signed-off-by: Bill Erickson <berickxx@gmail.com>
Signed-off-by: Jane Sandberg <sandbej@linnbenton.edu>
declare var MARC21;
+// MARC breaker delimiter
+const DELIMITER = '$';
+
export class MarcRecord {
id: number; // Database ID when known.
breakerText: string;
constructor(xml: string) {
- this.record = new MARC21.Record({marcxml: xml});
+ this.record = new MARC21.Record({marcxml: xml, delimiter: DELIMITER});
this.breakerText = this.record.toBreaker();
}
}
absorbBreakerChanges() {
- this.record = new MARC21.Record({marcbreaker: this.breakerText});
+ this.record = new MARC21.Record(
+ {marcbreaker: this.breakerText, delimiter: DELIMITER});
}
}