diff --git a/src/CLI.cpp b/src/CLI.cpp index 04cc6771..432da5f8 100644 --- a/src/CLI.cpp +++ b/src/CLI.cpp @@ -219,7 +219,7 @@ void CLI::lexArguments () if (lex.token (lexeme, type) && lex.isEOS ()) { - A2 a (Lexer::dequote (_original_args[i].attribute ("raw")), type); + A2 a (_original_args[i].attribute ("raw"), type); if (quoted) a.tag ("QUOTED"); diff --git a/src/TagInfoDatabase.cpp b/src/TagInfoDatabase.cpp index 0e29dfdf..7c7132f5 100644 --- a/src/TagInfoDatabase.cpp +++ b/src/TagInfoDatabase.cpp @@ -28,7 +28,6 @@ #include #include #include - #include "timew.h" /////////////////////////////////////////////////////////////////////////////// diff --git a/src/util.cpp b/src/util.cpp index 2be18117..12293ba4 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -54,11 +54,6 @@ std::string escape (const std::string& input, int c) //////////////////////////////////////////////////////////////////////////////// std::string quoteIfNeeded (const std::string& input) { - if (input[0] == '"' || input[0] == '\'') - { - return input; - } - auto quote = input.find ('"'); auto space = input.find (' '); auto op = input.find_first_of ("+-/()<^!=~_%"); diff --git a/test/start.t b/test/start.t index 8dec86ca..a13c8819 100755 --- a/test/start.t +++ b/test/start.t @@ -277,6 +277,14 @@ class TestStart(TestCase): self.t("start 1h ago proja") code, out, err = self.t("start 2h ago proja :adjust") + def test_start_with_one_quoted_and_one_non_quoted_tag(self): + """Start will allow tags encased in quotes""" + self.t("start 1h ago foo '\"bar\"' :debug") + + j = self.t.export() + self.assertOpenInterval(j[0], + expectedTags=["\"bar\"", "foo"]) + if __name__ == "__main__": from simpletap import TAPTestRunner