Layout adjustments.

Took 1 hour 54 minutes

Took 2 minutes
This commit is contained in:
Lukas Brübach 2025-09-28 09:12:39 +02:00
parent ed50fd98cd
commit 749afadf0f
10 changed files with 304 additions and 7 deletions

View file

@ -1,3 +1,5 @@
@page deck_search_syntax_help Deck Search Syntax Help
## Deck Search Syntax Help
-----
The search bar recognizes a set of special commands.<br>

View file

@ -1,3 +1,5 @@
\page search_syntax_help Search Syntax Help
## Search Syntax Help
-----
The search bar recognizes a set of special commands similar to some other card databases.<br>

View file

@ -22,8 +22,11 @@ static QTextBrowser *createBrowser(const QString &helpFile)
QString text = in.readAll();
file.close();
// Poor Markdown Converter
// --- Remove @page declarations at the top of the file ---
auto opts = QRegularExpression::MultilineOption;
text = text.replace(QRegularExpression(R"(^\s*@page[^\n]*\n)", opts), "");
// Poor Markdown Converter
text = text.replace(QRegularExpression("^(###)(.*)", opts), "<h3>\\2</h3>")
.replace(QRegularExpression("^(##)(.*)", opts), "<h2>\\2</h2>")
.replace(QRegularExpression("^(#)(.*)", opts), "<h1>\\2</h1>")