File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -108,10 +108,7 @@ QString StructuredRichText::parse(
108108 switch (val.type ())
109109 {
110110 case QJsonValue::Type::String:
111- glossary += escapeHtml (val.toString ()).replace (
112- ' \n ' ,
113- " <br>"
114- );
111+ glossary += escapeHtml (val.toString ()).replace (' \n ' , " <br>" );
115112 break ;
116113
117114 case QJsonValue::Type::Object:
@@ -127,7 +124,7 @@ QString StructuredRichText::parse(
127124 }
128125 else if (obj[KEY_TYPE] == VALUE_TYPE_TEXT)
129126 {
130- addText (obj, style, glossary);
127+ addText (obj, glossary);
131128 }
132129 break ;
133130 }
@@ -1070,14 +1067,10 @@ void StructuredRichText::addImage(
10701067 }
10711068}
10721069
1073- void StructuredRichText::addText (
1074- const QJsonObject &obj, Setting::GlossaryStyle style, QString &out) const
1070+ void StructuredRichText::addText (const QJsonObject &obj, QString &out) const
10751071{
10761072 constexpr const char *KEY_TEXT = " text" ;
1077- out += escapeHtml (obj[KEY_TEXT].toString ()).replace (
1078- ' \n ' ,
1079- style == Setting::GlossaryStyleBullet ? " </li><li>" : " <br>"
1080- );
1073+ out += escapeHtml (obj[KEY_TEXT].toString ()).replace (' \n ' , " <br>" );
10811074}
10821075
10831076/* End Other Object Parsers */
Original file line number Diff line number Diff line change @@ -231,12 +231,9 @@ class StructuredRichText : public QObject
231231 * @brief Add a text object to the HTML document.
232232 *
233233 * @param obj The text object.
234- * @param style The glossary style to display.
235234 * @param[out] out The string the formatted text will be appended to.
236235 */
237- void addText (
238- const QJsonObject &obj, Setting::GlossaryStyle style, QString &out
239- ) const ;
236+ void addText (const QJsonObject &obj, QString &out) const ;
240237
241238 /* *
242239 * Determines if an array contains structured content.
You can’t perform that action at this time.
0 commit comments