DivinumOfficium / divinum-officium

The Divinum Officium Project: Traditional Roman Missal and Breviary Texts
http://www.divinumofficium.com/
303 stars 193 forks source link

Extra line breaks are now being added #3742

Closed fiapps closed 4 months ago

fiapps commented 4 months ago

I find that in multiple places an extra <BR> is being added to the output. Some examples are in tomorrow's Matins, which has three <BR> between the Deo gratias after lectio 9 and the Te Deum. It may be that the extra line breaks are coming at the beginning of elements rather than the end, because there's a <BR> before the Iube, Dómine, benedícere of lectio 1, lectio 4, and lectio 7, where none is needed.

Another case is in the Lauds of St. Joachim, where the chapter, hymn, and verse are now separated by a series of three <BR> instead of two.

I think this is somehow related to #3741. It's certainly a change in the last week.

fiapps commented 4 months ago

The connection with #3741 could be that it removed from some regexes whitespace matching at the beginning and the end. I assume that was because the matching seemed unnecessary, but it may be that there is an uncommon case in which it is needed.

fiapps commented 4 months ago

Thank you for fixing this. When I test now I still find a large number of differences in the output of officium.pl, but they are not the same as the differences before this issue was fixed. A lot of them are due to the Te Deum changes, and those don't represent errors. I do see one that looks like an error, but I can't reproduce it now on your live site, where at least the Te Deum changes have not yet been deployed.

I'm seeing this in Eastertide for the verse at Lauds (in the Chapter Response Verse section):

℣. In resurrectióne tua, Christe, allelúia. , allelúia. So some bug is wiping out the response and just giving the alleluia. It's possible that this is a problem in my integration of your changes, so I didn't open a new issue, but I suspect that when you deploy the latest changes, you will see it too.

As far as the process for making changes goes, I would suggest:

  1. Before submitting a pull request to change the code, use divinum-replay.plwith a large set of cases to verify that new code doesn't introduce unexpected changes.
  2. Fix bugs introduced by previous changes and wait to make sure the code works well before making pull requests for new changes, or at least before merging such pull requests.
APMarcello3 commented 4 months ago

@mbab Please note.