mirror of
https://github.com/ggml-org/llama.cpp.git
synced 2025-06-30 12:55:17 +00:00
minja: fix vigogne (https://github.com/google/minja/pull/22)
This commit is contained in:
@ -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) {
|
||||
|
Reference in New Issue
Block a user