Skip to content

Commit

Permalink
Do not emit text-decoration style attribute for empty text
Browse files Browse the repository at this point in the history
  • Loading branch information
tobiolo committed Sep 9, 2023
1 parent d77b472 commit ff69e09
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/cell.h
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ struct Cell {
wxString ToText(int indent, const Selection &s, int format, Document *doc, bool inheritstyle) {
wxString str = text.ToText(indent, s, format);
if (format == A_EXPHTMLT && ((text.stylebits & STYLE_UNDERLINE) || (text.stylebits & STYLE_STRIKETHRU))
&& this != doc->curdrawroot) {
&& this != doc->curdrawroot && !str.IsEmpty()) {
wxString spanstyle = L"text-decoration:";
spanstyle += (text.stylebits & STYLE_UNDERLINE) ? L" underline" : wxEmptyString;
spanstyle += (text.stylebits & STYLE_STRIKETHRU) ? L" line-through" : wxEmptyString;
Expand Down

0 comments on commit ff69e09

Please sign in to comment.