Skip to content

Commit

Permalink
remove plugin title from README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
rodlie committed Dec 5, 2021
1 parent 0d7d309 commit 2e44793
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/pluginviewwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -182,8 +182,11 @@ void PluginViewWidget::showPlugin(const QString &id)
#if QT_VERSION < QT_VERSION_CHECK(5, 14, 0)
_pluginDescBrowser->setHtml(desc);
#else
if (!plugin.readme.isEmpty()) { _pluginDescBrowser->setMarkdown(plugin.readme); }
else { _pluginDescBrowser->setHtml(desc); }
if (!plugin.readme.isEmpty()) {
QString markdown = plugin.readme;
QString title = QString("# %1").arg(QString(plugin.label).replace(" ", "_"));
_pluginDescBrowser->setMarkdown(markdown.replace(title, ""));
} else { _pluginDescBrowser->setHtml(desc); }
#endif

if (_plugins->hasAvailablePlugin(plugin.id)) {
Expand Down

0 comments on commit 2e44793

Please sign in to comment.