Skip to content

Commit 8938586

Browse files
committed
platform: trailing space on reference when inserting note
- added trailing space back in on `fr` and `xo`
1 parent af30790 commit 8938586

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

libs/shared-react/src/nodes/usj/node-react.utils.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ export function $createNoteChildren(
188188
case "ef":
189189
case "efe":
190190
if (chapterNum !== undefined && verseNum !== undefined) {
191-
children.push($createCharNode("fr").append($createTextNode(`${chapterNum}:${verseNum}`)));
191+
children.push($createCharNode("fr").append($createTextNode(`${chapterNum}:${verseNum} `)));
192192
}
193193
if (!selection.isCollapsed()) {
194194
const selectedText = selection.getTextContent().trim();
@@ -202,7 +202,7 @@ export function $createNoteChildren(
202202
case "x":
203203
case "ex":
204204
if (chapterNum !== undefined && verseNum !== undefined) {
205-
children.push($createCharNode("xo").append($createTextNode(`${chapterNum}:${verseNum}`)));
205+
children.push($createCharNode("xo").append($createTextNode(`${chapterNum}:${verseNum} `)));
206206
}
207207
if (!selection.isCollapsed()) {
208208
const selectedText = selection.getTextContent().trim();

packages/platform/src/editor/adaptors/usj-marker-action.utils.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ const getFootnoteMarkerAction: (footnoteMarker: string) => UsjMarkerAction = (fo
6565
noteChildren.push({
6666
type: "char",
6767
marker: "fr",
68-
content: [`${chapterNum}:${verseNum}`],
68+
content: [`${chapterNum}:${verseNum} `],
6969
});
7070
if (currentEditor.noteText)
7171
noteChildren.push({
@@ -101,7 +101,7 @@ const getCrossReferenceMarkerAction: (crossReferenceMarker: string) => UsjMarker
101101
noteChildren.push({
102102
type: "char",
103103
marker: "xo",
104-
content: [`${chapterNum}:${verseNum}`],
104+
content: [`${chapterNum}:${verseNum} `],
105105
});
106106
if (currentEditor.noteText)
107107
noteChildren.push({

0 commit comments

Comments
 (0)