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