From ff6d179549ec5cb092932c128c55d1be76619209 Mon Sep 17 00:00:00 2001 From: Jan Macku Date: Fri, 3 May 2024 12:53:02 +0200 Subject: [PATCH] cshtml: use the `.json` extension for JSON files Correctly reference accepted format as JSON instead of JS. Closes: https://github.com/csutils/csdiff/pull/176 --- src/cshtml.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cshtml.cc b/src/cshtml.cc index 60c02c03..91bbf8d6 100644 --- a/src/cshtml.cc +++ b/src/cshtml.cc @@ -42,7 +42,7 @@ std::string titleFromFileName(const std::string &fileName) // no version information -> bailing out return ""; - const RE reTitle("^(?:.*/)?([^/]*)\\.(?:err|js)$"); + const RE reTitle("^(?:.*/)?([^/]*)\\.(?:err|js|json)$"); boost::smatch sm; if (!boost::regex_match(fileName, sm, reTitle)) @@ -64,7 +64,7 @@ int main(int argc, char *argv[]) namespace po = boost::program_options; po::variables_map vm; po::options_description desc(string("Usage: ") + name - + " [options] proj.js, where options are", /* line_length */ 0x80); + + " [options] proj.json, where options are", /* line_length */ 0x80); typedef std::vector TStringList; string defUrlTemplate, fnBase, checkerIgnRegex, plainTextUrl, spPosition;