Calculate phrase indices above 26 with double letters #928
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This issue was first discovered in multiple verses in the Nambikwara project:
Scriptoria: https://app.scriptoria.io/projects/567
ScriptureEarth: https://scriptureearth.org/data/nab/sab/nab/#/text
Certain verses, e.g. 1 Peter 3:1-2, were long enough that the automatic phrase division resulted in more than 26 phrases, causing the rendering method to fail when attempting to query the DOM with a non-existent phrase index due to being out of bounds of the 26 character array used to generate the phrase indicator used in the DOM.
The method to generate said phrase indicator has been updated to generate two-letter indicators once the initial single-letter ones have been exhausted.
i.e. 0-25 => a-z
26+ => aa, ab, ... zz
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.