diff --git a/AUTHORS b/AUTHORS index ffcf9c092..a90a432e7 100644 --- a/AUTHORS +++ b/AUTHORS @@ -3,6 +3,7 @@ Principal Author: Contributing Authors: Damian Glenny + Andy Lester With thanks to: Eugene Kramer @@ -14,5 +15,4 @@ With thanks to: galvanizd H. İbrahim Güngör Stas Antons - Andy Lester - + Vincent Fleuranceau diff --git a/ChangeLog b/ChangeLog index 8071d3259..bfdcfd9d5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -14,6 +14,8 @@ represents a feature release, and the Z represents a patch. character (thanks to Andy Lester) + Task now uses dashes (-----) to column underlines when color is disabled (thanks to Vincent Fleuranceau) + + Task now allows mixed case attribute names (pri:, PRI:, Pri: ...) and + commands (add, ADD, Add ...) (thanks to Vincent Fleuranceau) ------ old releases ------------------------------ diff --git a/html/task.html b/html/task.html index 3b1893d1d..12882c036 100644 --- a/html/task.html +++ b/html/task.html @@ -98,6 +98,8 @@ first character (thanks to Andy Lester).
  • Task now uses dashes (-----) to underline column headings when color is disabled (thanks to Vincent Fleuranceau). +
  • Task now allows mixed case attribute names (pri:, PRI:, Pri: ...) + and commands (add, ADD, Add ...) (thanks to Vincent Fleuranceau).

    diff --git a/src/parse.cpp b/src/parse.cpp index a8bba1e57..4dcd3bdbd 100644 --- a/src/parse.cpp +++ b/src/parse.cpp @@ -371,8 +371,8 @@ void parse ( std::string to; // An id is the first argument found that contains all digits. - if (command != "add" && // "add" doesn't require an ID - task.getId () == 0 && + if (lowerCase (command) != "add" && // "add" doesn't require an ID + task.getId () == 0 && validId (arg)) task.setId (::atoi (arg.c_str ())); @@ -389,7 +389,7 @@ void parse ( // value. else if ((colon = arg.find (":")) != std::string::npos) { - std::string name = arg.substr (0, colon); + std::string name = lowerCase (arg.substr (0, colon)); std::string value = arg.substr (colon + 1, std::string::npos); if (validAttribute (name, value, conf)) @@ -413,8 +413,9 @@ void parse ( // Command. else if (command == "") { - if (isCommand (arg) && validCommand (arg)) - command = arg; + std::string l = lowerCase (arg); + if (isCommand (l) && validCommand (l)) + command = l; else descCandidate += arg; // throw std::string ("'") + arg + "' is not a valid command.";