unfoldingWord / gateway-edit

Book Package harmonized view.
https://gatewayedit.com
MIT License
1 stars 4 forks source link

Usfm markers displayed incorrectly in Psalms #663

Open elsylambert opened 3 months ago

elsylambert commented 3 months ago

GWE is changing \qs Selah \qs to \qs \qs Selah.

elsylambert commented 3 months ago

@PhotoNomad0 Please add in details to this issue.

PhotoNomad0 commented 3 months ago

Here is an example of the problem, When I open unfoldingWord/en/ult on the QA server to Psa 140:8, and then click to edit, it shows:

Screenshot 2024-08-15 at 9 10 31 AM
PhotoNomad0 commented 3 months ago

The core of the problems looks like a bug in the usfm-js library: in converting json to USFM the original JSON object is modified. In the process the end tag (\qs*) gets corrupted. Updating the library to fix the error and added a unit test for the case. Also updated the unit tests to fail if the JSON object is modified. @elsylambert

PhotoNomad0 commented 3 months ago

@elsylambert There is a fix in dev build v2.4.1

When you open unfoldingWord/en/ult on the QA server to Psa 140:8, and then click to edit, it should show:

Screenshot 2024-08-16 at 7 06 39 PM

@elsylambert note this should fix both the corruption of the qs end tag, also fix for handling white space such as spaces with newline after the tags.

PhotoNomad0 commented 3 months ago

Note - The core of the fix is in https://github.com/unfoldingWord/usfm-js/pull/107

elsylambert commented 3 months ago

Verified in v2.4.1 build 01e3183 QA, Usfm markers \qs and \qs* are displayed correctly.

Screenshot 2024-08-21 at 1 56 03 PM