From a538206397f25d207282dc0d493fb2d2a9d1ebee Mon Sep 17 00:00:00 2001
From: Bill Erickson <berickxx@gmail.com>
Date: Wed, 10 Jul 2019 11:51:53 -0400
Subject: [PATCH] LP1834665 Flat text editor uses '$' delimiter
MIME-Version: 1.0
Content-Type: text/plain; charset=utf8
Content-Transfer-Encoding: 8bit

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>
---
 Open-ILS/src/eg2/src/app/staff/share/marc-edit/marcrecord.ts | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/Open-ILS/src/eg2/src/app/staff/share/marc-edit/marcrecord.ts b/Open-ILS/src/eg2/src/app/staff/share/marc-edit/marcrecord.ts
index 1b0c488e46..df1a492762 100644
--- a/Open-ILS/src/eg2/src/app/staff/share/marc-edit/marcrecord.ts
+++ b/Open-ILS/src/eg2/src/app/staff/share/marc-edit/marcrecord.ts
@@ -4,6 +4,9 @@
 
 declare var MARC21;
 
+// MARC breaker delimiter
+const DELIMITER = '$';
+
 export class MarcRecord {
 
     id: number; // Database ID when known.
@@ -12,7 +15,7 @@ export class MarcRecord {
     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();
     }
 
@@ -25,7 +28,8 @@ export class MarcRecord {
     }
 
     absorbBreakerChanges() {
-        this.record = new MARC21.Record({marcbreaker: this.breakerText});
+        this.record = new MARC21.Record(
+            {marcbreaker: this.breakerText, delimiter: DELIMITER});
     }
 }
 
-- 
2.11.0