Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

\p should not have any trailing spaces before the newline #7164

Closed
birchamp opened this issue Aug 30, 2021 · 20 comments
Closed

\p should not have any trailing spaces before the newline #7164

birchamp opened this issue Aug 30, 2021 · 20 comments
Assignees
Labels

Comments

@birchamp
Copy link
Contributor

Currently USFM exports text incorrectly. It puts a space or two after '\p' If this marker is on a line by itself then it should be followed by a newline immediately. Note: \p may be followed by text on the same line, but typically it is just by itself.

@da1nerd
Copy link
Contributor

da1nerd commented Sep 2, 2021

@birchamp does this look like what you want?

\v 4 In this way they may train the younger women to love their own husbands and children,
+ \p
- \p  
\v 5 From Abraham to King David, the following ancestors are listed: Abraham,
Isaac, Jacob, Judah and his brothers; then Perez and Zerah (their mother was Tamar*),
Hezron, Ram, Amminadab, Nahshon, Salmon, Boaz (his mother was Rahab*), Obed (his
mother was \jmp Ruth|link-href="#article-Ruth"\jmp*), Jesse, and King David.
\p some inline text

@birchamp
Copy link
Contributor Author

birchamp commented Sep 2, 2021

@da1nerd yes, that looks right to me, but I'd like @RobH123 to take a look at it to be sure.

@RobH123
Copy link

RobH123 commented Sep 2, 2021

Oh yes, thanks @da1nerd. I guess when you think you're mostly done, I'd like a quick look thru some whole file outputs (e.g., email them or put them in a branch or something) before you move on to other things.

@elsylambert
Copy link

@mannycolon Can you please help me locate where the build is to test 3.0.2 issues?

@mannycolon
Copy link
Contributor

I'm not sure where build 3.0.2 can be found. It looks like both 3.0.2 and 3.1.0 got merged into the same develop branch before a release branch was created for 3.0.2. I would ask @birchamp @da1nerd @PhotoNomad0 any further questions

@elsylambert
Copy link

elsylambert commented Nov 5, 2021

@birchamp I tested this issue in translationCore 3.0.2 (e2d8c61). I imported a project from D43 online(which has white space in its usfm), but after the online import, the new project's usfm does not have white space after /p and in |x .
Screen Shot 2021-11-05 at 1 42 47 PM
But this works only for online import, not for local import. Neither does it work for Export to usfm. When exported to usfm, it is still adding white spaces
Screen Shot 2021-11-05 at 1 44 13 PM
.

@elsylambert
Copy link

@da1nerd does this issue cover only online imports?

@da1nerd
Copy link
Contributor

da1nerd commented Nov 5, 2021

I think we only got as far as discussing and identifying the changes to be made. This hasn't been implemented yet.

@PhotoNomad0
Copy link
Contributor

@da1nerd It looks like unfoldingWord/usfm-js#101 is the fix for this?

1 similar comment
@PhotoNomad0
Copy link
Contributor

@da1nerd It looks like unfoldingWord/usfm-js#101 is the fix for this?

@da1nerd
Copy link
Contributor

da1nerd commented Nov 8, 2021

wow I guess' it's been quite a while. I totally forgot about that PR.

@PhotoNomad0
Copy link
Contributor

@elsylambert verified in translationCore 3.0.2 (c8c2941)

@elsylambert
Copy link

elsylambert commented Nov 19, 2021

Verified in translationCore 3.0.2 (c8c2941). \p still adds white spaces after Export to USFM. These are two usfm files that I had exported. The projects(source usfm) does not have any spaces after \p.
67-REV-test2.usfm.zip

43-LUK-test.usfm.zip

@PhotoNomad0
Copy link
Contributor

PhotoNomad0 commented Nov 19, 2021

@elsylambert are these usfm files the source or the output? if not the source, could you zip up the projects so I could reproduce the problem? Thanks.

@elsylambert
Copy link

@PhotoNomad0 ^^ those were output files after the export to USFM. Here are the zipped source projects:
en_new_rev_book.zip
en_loc_luk_book.zip

@PhotoNomad0
Copy link
Contributor

@elsylambert Some good test projects here. Actually the projects do have a space after the \p marker. Will have to find a way to fix this in the USFM export since we do not want this.

Screen Shot 2021-11-19 at 4 12 28 PM

@PhotoNomad0
Copy link
Contributor

@elsylambert Also FYI - do not pay attention to the USFM files in the base project folder. The two in red are old orphan files either copies of original USFM import or generated by previous DCS uploads before project was renamed. The one in orange was created the last time you uploaded to DCS and will only be uploaded on DCS uploads. The recent data used by tCore are stored in json files in the rev folder.

Screen Shot 2021-11-19 at 4 21 59 PM

@PhotoNomad0
Copy link
Contributor

@elsylambert - Have a fix for the projects you found in translationCore 3.0.2 (0d9cd25).

@elsylambert
Copy link

Looks good in translationCore 3.0.2 (0d9cd25). Not seeing trailing spaces.

@gayathrihayden
Copy link

Fix tested in tC 3.0.2 (0d9cd25) and works fine.

Reference screenshots:

In tC 3.0.1 (343198b), notice trailing space after \p:

tC_3_0_1-trailing_space p

In tC 3.0.2 (0d9cd25), do not observe trailing space after \p:

tC_3_0_2-no trailing_space character p

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

7 participants