Lexer: Captures minimumMatchLength for abbreviated attribute matching

This commit is contained in:
Paul Beckingham 2015-07-26 22:58:02 -04:00
parent 8406dd4c6f
commit f5792a03fb
3 changed files with 5 additions and 1 deletions

View file

@ -617,6 +617,7 @@ void Context::getLimits (int& rows, int& lines)
void Context::staticInitialization ()
{
CLI2::minimumMatchLength = config.getInteger ("abbreviation.minimum");
Lexer::minimumMatchLength = config.getInteger ("abbreviation.minimum");
Task::defaultProject = config.get ("default.project");
Task::defaultDue = config.get ("default.due");

View file

@ -34,10 +34,12 @@
static const std::string uuid_pattern = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx";
static const unsigned int uuid_min_length = 8;
std::map <std::string, std::string> Lexer::attributes;
std::string Lexer::dateFormat = "";
bool Lexer::isoEnabled = true;
int Lexer::minimumMatchLength = 3;
std::map <std::string, std::string> Lexer::attributes;
////////////////////////////////////////////////////////////////////////////////
Lexer::Lexer (const std::string& text)

View file

@ -41,6 +41,7 @@ public:
// These are overridable.
static std::string dateFormat;
static bool isoEnabled;
static int minimumMatchLength;
static std::map <std::string, std::string> attributes;
enum class Type { uuid, number, hex,