From 9f22ea05a64cf68a6531401e705798012bb4cc77 Mon Sep 17 00:00:00 2001 From: Timofey Khoruzhii Date: Sat, 29 Oct 2022 09:51:05 +0300 Subject: [PATCH] Add support global commands and several blocks scripts --- src/clippy/config.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/clippy/config.cpp b/src/clippy/config.cpp index c0becba..1940174 100644 --- a/src/clippy/config.cpp +++ b/src/clippy/config.cpp @@ -32,15 +32,19 @@ std::unique_ptr Config::GetTarget( target_begin = true; continue; } + if (current.empty()) { continue; } + if (!std::isspace(current[0]) && target_begin) { - break; + target_begin = false; } if (target_begin) { target_commands.emplace_back(Strip(std::move(current))); + } else if (current[0] == '!') { + target_commands.emplace_back(current.substr(1, current.size() - 1)); } }