Function: formatVerseText()
formatVerseText(
verse):FormattedVerse
Defined in: Services/VerseFormatter.ts:90
Formats a BibleVerse's raw text into display-ready HTML.
Handles three concerns:
- Tag cleanup — strips legacy tags and OSIS/SWORD XML tags
- Paragraph detection — checks both the pilcrow character (¶) and formattingData
- Words of Christ — wraps red-letter ranges in
The word-offset system for Words of Christ works by stripping all HTML, splitting into words, then rebuilding with span boundaries at the positions specified in formattingData.wordsOfChrist.