mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-11 05:07:00 -04:00
feat: add underline to panels and export
This commit is contained in:
@@ -209,7 +209,8 @@ String to_html(const String& str_in, const SymbolFontP& symbol_font, double symb
|
||||
String str = remove_tag_contents(str_in,_("<sep-soft"));
|
||||
String ret;
|
||||
Tag bold (_("<b>"), _("</b>")),
|
||||
italic(_("<i>"), _("</i>")),
|
||||
italic(_("<i>"), _("</i>")),
|
||||
underline(_("<u>"), _("</u>")),
|
||||
symbol(_("<span class=\"symbol\">"), _("</span>"));
|
||||
TagStack tags;
|
||||
String symbols;
|
||||
@@ -224,7 +225,11 @@ String to_html(const String& str_in, const SymbolFontP& symbol_font, double symb
|
||||
} else if (is_substr(str, i, _("i"))) {
|
||||
tags.open (ret, italic);
|
||||
} else if (is_substr(str, i, _("/i"))) {
|
||||
tags.close(ret, italic);
|
||||
tags.close(ret, italic);
|
||||
} else if (is_substr(str, i, _("u"))) {
|
||||
tags.open(ret, underline);
|
||||
} else if (is_substr(str, i, _("/u"))) {
|
||||
tags.close(ret, underline);
|
||||
} else if (is_substr(str, i, _("sym"))) {
|
||||
tags.open (ret, symbol);
|
||||
} else if (is_substr(str, i, _("/sym"))) {
|
||||
@@ -300,7 +305,8 @@ String to_bbcode(const String& str_in) {
|
||||
String str = remove_tag_contents(str_in,_("<sep-soft"));
|
||||
String ret;
|
||||
Tag bold (_("[b]"), _("[/b]")),
|
||||
italic(_("[i]"), _("[/i]"));
|
||||
italic(_("[i]"), _("[/i]")),
|
||||
underline(_("[u]"), _("[/u]"));
|
||||
TagStack tags;
|
||||
String symbols;
|
||||
for (size_t i = 0 ; i < str.size() ; ) {
|
||||
@@ -315,7 +321,12 @@ String to_bbcode(const String& str_in) {
|
||||
tags.open (ret, italic);
|
||||
} else if (is_substr(str, i, _("/i"))) {
|
||||
tags.close(ret, italic);
|
||||
} /*else if (is_substr(str, i, _("sym"))) {
|
||||
} else if (is_substr(str, i, _("u"))) {
|
||||
tags.open(ret, underline);
|
||||
} else if (is_substr(str, i, _("/u"))) {
|
||||
tags.close(ret, underline);
|
||||
}
|
||||
/*else if (is_substr(str, i, _("sym"))) {
|
||||
tags.open (ret, symbol);
|
||||
} else if (is_substr(str, i, _("/sym"))) {
|
||||
if (!symbols.empty()) {
|
||||
|
||||
Reference in New Issue
Block a user