diff --git a/game/localplayer/Help.cpp b/game/localplayer/Help.cpp index 21a08b2..3c12400 100644 --- a/game/localplayer/Help.cpp +++ b/game/localplayer/Help.cpp @@ -190,7 +190,19 @@ void HelpDlg::prepare(int sbPos) : phrases.lookup(QStringLiteral("FEATURES"), no); break; case LinkCategory::Model: title = helpText.lookup(QStringLiteral("HELPTITLE_MODELLIST")); break; - case LinkCategory::Text: title = helpText.lookupByHandle(no); break; + case LinkCategory::Text: { + // Text pages carry their own "$Caption\" markup prefix (handled by + // addTextual() for the body) - extract just that for the heading + // instead of using the whole raw (multi-paragraph) body as-is. + const QString body = helpText.lookupByHandle(no); + if (!body.isEmpty() && body.at(0) == QLatin1Char('$')) { + const int brk = body.indexOf(QLatin1Char('\\')); + title = brk > 0 ? body.mid(1, brk - 1) : body.mid(1); + } else { + title = body; + } + break; + } case LinkCategory::Misc: switch (static_cast(no)) { case MiscLinkIndex::Main: title = helpText.lookup(QStringLiteral("HELPTITLE_MAIN")); break;