From 0150d505debd95e8786b138972ecc4aba33a4a37 Mon Sep 17 00:00:00 2001 From: ridiculousfish Date: Mon, 27 May 2019 17:38:09 -0700 Subject: [PATCH] Allow underscores to be treated as dashes in debug categories --- src/flog.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/flog.cpp b/src/flog.cpp index 490b78ee5..9a9bfa3e1 100644 --- a/src/flog.cpp +++ b/src/flog.cpp @@ -73,7 +73,10 @@ static void apply_one_wildcard(const wcstring &wc_esc, bool sense) { } } -void activate_flog_categories_by_pattern(const wcstring &wc) { +void activate_flog_categories_by_pattern(const wcstring &inwc) { + // Normalize underscores to dashes, allowing the user to be sloppy. + wcstring wc = inwc; + std::replace(wc.begin(), wc.end(), L'_', L'-'); for (const wcstring &s : split_string(wc, L',')) { if (string_prefixes_string(s, L"-")) { apply_one_wildcard(s.substr(1), false);