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