From b7e67686acaf3aac53897fca8fed1cf61d3c6161 Mon Sep 17 00:00:00 2001 From: Raul Metsma Date: Wed, 20 Nov 2024 15:49:47 +0200 Subject: [PATCH] Don't remove whitespace from xml text element IB-8297 Signed-off-by: Raul Metsma --- src/XMLDocument.h | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/XMLDocument.h b/src/XMLDocument.h index 63820d912..1810ace67 100644 --- a/src/XMLDocument.h +++ b/src/XMLDocument.h @@ -174,11 +174,8 @@ struct XMLElem constexpr operator sv() const noexcept { - constexpr sv whitespace {" \n\r\f\t\v"}; auto *text = children(&value_type::children, XML_TEXT_NODE); - auto result = to_string_view(text, &std::decay_t::content); - result.remove_prefix(std::min(result.find_first_not_of(whitespace), result.size())); - return result; + return to_string_view(text, &std::decay_t::content); } pointer d{};