Skip to content

Commit 2af7d0d

Browse files
NiuGuohuitordex
authored andcommitted
fix: Remove text-emphasis-style end space.
1 parent e077b97 commit 2af7d0d

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/css_properties.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -385,13 +385,13 @@ void litehtml::css_properties::compute_font(const html_tag* el, const document::
385385
}
386386

387387
// text-emphasis
388-
m_text_emphasis_style = el->get_property<string>(_text_emphasis_style_, true, "unset", offset(m_text_emphasis_style));
388+
m_text_emphasis_style = el->get_property<string>(_text_emphasis_style_, true, "", offset(m_text_emphasis_style));
389389
m_text_emphasis_position = el->get_property<int>(_text_emphasis_position_, true, text_emphasis_position_over, offset(m_text_emphasis_position));
390390
m_text_emphasis_color = get_color_property(el, _text_emphasis_color_, true, web_color::current_color, offset(m_text_emphasis_color));
391391

392392
if(el->parent())
393393
{
394-
if(m_text_emphasis_style == "initial" || m_text_emphasis_style == "unset")
394+
if(m_text_emphasis_style.empty() || m_text_emphasis_style == "initial" || m_text_emphasis_style == "unset")
395395
{
396396
m_text_emphasis_style = el->parent()->css().get_text_emphasis_style();
397397
}

src/style.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1343,6 +1343,7 @@ void style::parse_text_emphasis(const css_token_vector& tokens, bool important,
13431343
if(parse_text_emphasis_color(token, important, container)) continue;
13441344
style.insert(0, token.str + " ");
13451345
}
1346+
style = trim(style);
13461347
if (!style.empty())
13471348
{
13481349
add_parsed_property(_text_emphasis_style_, property_value(style, important));

0 commit comments

Comments
 (0)