Skip to content

Commit

Permalink
cshtml: use the .json extension for JSON files
Browse files Browse the repository at this point in the history
Correctly reference accepted format as JSON instead of JS.

Closes: #176
  • Loading branch information
jamacku committed May 3, 2024
1 parent 4ae879f commit ff6d179
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/cshtml.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand All @@ -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<string> TStringList;
string defUrlTemplate, fnBase, checkerIgnRegex, plainTextUrl, spPosition;
Expand Down

0 comments on commit ff6d179

Please sign in to comment.