commit e9308a4: [Minor] Fix misprint

Vsevolod Stakhov vsevolod at highsecure.ru
Thu Jul 8 18:28:04 UTC 2021


Author: Vsevolod Stakhov
Date: 2021-07-08 19:24:06 +0100
URL: https://github.com/rspamd/rspamd/commit/e9308a4f33c1be3f8057d5a9dc4d60400f58b221 (HEAD -> master)

[Minor] Fix misprint

---
 src/libserver/html/html.cxx       | 3 +++
 src/libserver/html/html_block.hxx | 2 +-
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/libserver/html/html.cxx b/src/libserver/html/html.cxx
index 346f87644..b8a5e1d32 100644
--- a/src/libserver/html/html.cxx
+++ b/src/libserver/html/html.cxx
@@ -2138,6 +2138,9 @@ TEST_CASE("html text extraction")
 			/* Colors */
 			{"goodbye <span style=\"COLOR: rgb(64,64,64)\">cruel</span>"
 			 "<span>world</span>", "goodbye cruelworld"},
+			/* Font-size propagation */
+			{"<p style=\"font-size: 11pt;line-height:22px\">goodbye <span style=\"font-size:0px\">cruel</span>world</p>",
+					"goodbye world\n"},
 			/* Newline before tag -> must be space */
 			{"goodbye <span style=\"COLOR: rgb(64,64,64)\">cruel</span>\n"
 			 "<span>world</span>", "goodbye cruel world"},
diff --git a/src/libserver/html/html_block.hxx b/src/libserver/html/html_block.hxx
index 64b53ed7c..8416bbc5a 100644
--- a/src/libserver/html/html_block.hxx
+++ b/src/libserver/html/html_block.hxx
@@ -135,7 +135,7 @@ struct html_block {
 		 * 5) Parent size is undefined and our size is < 0 - tricky stuff, assume some defaults
 		 */
 		auto size_prop = [&](auto mask_val, auto &our_val, auto other_val, auto default_val) constexpr -> void {
-			if (!(mask & mask_val)) {
+			if ((mask & mask_val)) {
 				/* We have our value */
 				if (our_val < 0) {
 					if (other.mask & mask_val) {


More information about the Commits mailing list