Skip to content

Commit

Permalink
Add processing of <hi type="super"> elements
Browse files Browse the repository at this point in the history
  • Loading branch information
tobias-klein committed Jun 9, 2024
1 parent 4807516 commit e77a80c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/sword_backend/text_processor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ string TextProcessor::getFilteredText(const string& text, int chapter, int verse
static string itemEndElement = "</item>";
static string hiBold = "<hi type=\"bold";
static string hiItalic = "<hi type=\"italic";
static string hiSuper = "<hi type=\"super";

static regex milestoneFilter = regex("<milestone.*?/>");
static regex segStartElementFilter = regex("<seg.*?>");
Expand Down Expand Up @@ -171,6 +172,7 @@ string TextProcessor::getFilteredText(const string& text, int chapter, int verse
this->findAndReplaceAll(filteredText, itemEndElement, "</li>");
this->findAndReplaceAll(filteredText, hiBold, "<hi class=\"bold");
this->findAndReplaceAll(filteredText, hiItalic, "<hi class=\"italic");
this->findAndReplaceAll(filteredText, hiSuper, "<hi class=\"super");

filteredText = regex_replace(filteredText, selfClosingElement, "<$2 $3></$2>");

Expand Down

0 comments on commit e77a80c

Please sign in to comment.