62 if (
auto *
const vk_mod =
dynamic_cast<sword::VerseKey *
>(m.getKey()))
63 vk_mod->setIntros(
true);
72 if (sword::stricmp(m.getKey()->getText(),
rawKey())
73 && !strstr(m.getKey()->getText(),
rawKey()))
75 qDebug(
"return an empty key for %s", m.getKey()->getText());
84 auto text = QString::fromUtf8(m.renderText(
nullptr, -1, DoRender).c_str());
90 const QString t(text);
91 static QRegularExpression
const rx(
92 QStringLiteral(R
"PCRE((GREEK|HEBREW) for 0*([1-9]\d*))PCRE"));
93 QRegularExpressionMatch match;
95 while ((pos = t.indexOf(rx, pos, &match)) != -1) {
96 auto language = match.captured(1);
97 auto langcode = language.at(0);
98 auto number = match.captured(2);
99 auto paddednumber = number.rightJustified(5,
'0');
104 R
"PCRE((>[^<>]+))PCRE"
105 R
"PCRE(\\b(0*%1)\\b)PCRE")
106 .arg(std::move(number))),
107 QStringLiteral(
"\\1<span lemma=\"%1%2\">"
108 "<a href=\"strongs://%3/%2\">\\2</a></span>")
109 .arg(std::move(langcode),
110 std::move(paddednumber),
111 std::move(language)));
112 pos += match.capturedLength();