From e11b7fbb23381dfe730905e255d727dae823c180 Mon Sep 17 00:00:00 2001 From: ochafik Date: Sat, 18 Jan 2025 17:41:03 +0000 Subject: [PATCH 1/2] Unskip bofenghuang/vigogne-2-70b-chat from tests --- tests/CMakeLists.txt | 6 ------ 1 file changed, 6 deletions(-) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index e9a3f04..a41c995 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -83,12 +83,6 @@ set(MODEL_IDS # xai-org/grok-1 ) -if(WIN32) - list(REMOVE_ITEM MODEL_IDS - bofenghuang/vigogne-2-70b-chat - ) -endif() - # Create one test case for each {template, context} combination file(GLOB CONTEXT_FILES "${CMAKE_SOURCE_DIR}/tests/contexts/*.json") execute_process( From 48db570eda2d52e21dd79b0f988c755790fbeec4 Mon Sep 17 00:00:00 2001 From: ochafik Date: Sat, 18 Jan 2025 17:48:56 +0000 Subject: [PATCH 2/2] Fix strip on Windows --- include/minja/minja.hpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/include/minja/minja.hpp b/include/minja/minja.hpp index 9d9a1a0..8b6c243 100644 --- a/include/minja/minja.hpp +++ b/include/minja/minja.hpp @@ -1305,12 +1305,10 @@ struct ArgumentsExpression { }; static std::string strip(const std::string & s) { - static std::regex trailing_spaces_regex("^\\s+|\\s+$"); - return std::regex_replace(s, trailing_spaces_regex, ""); - // auto start = s.find_first_not_of(" \t\n\r"); - // if (start == std::string::npos) return ""; - // auto end = s.find_last_not_of(" \t\n\r"); - // return s.substr(start, end - start + 1); + auto start = s.find_first_not_of(" \t\n\r"); + if (start == std::string::npos) return ""; + auto end = s.find_last_not_of(" \t\n\r"); + return s.substr(start, end - start + 1); } static std::string html_escape(const std::string & s) {