From 0ee26a0caef171f182801ae75b929495e0d85c2d Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Mon, 6 Jul 2015 12:14:52 -0400 Subject: [PATCH] CLI2: No longer attempts to canonicalize rc: and rc.: --- src/CLI2.cpp | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/src/CLI2.cpp b/src/CLI2.cpp index 8113d0fbd..65b9617d2 100644 --- a/src/CLI2.cpp +++ b/src/CLI2.cpp @@ -869,13 +869,23 @@ void CLI2::canonicalizeNames () { if (a._lextype == Lexer::Type::pair) { - std::string name = a.attribute ("name"); - std::string canonical; - if (canonicalize (canonical, "pseudo", name) || - canonicalize (canonical, "attribute", name) || - canonicalize (canonical, "uda", name)) + std::string raw = a.attribute ("raw"); + if (raw.substr (0, 3) != "rc:" && + raw.substr (0, 3) != "rc.") { - a.attribute ("canonical", canonical); + std::string name = a.attribute ("name"); + std::string canonical; + if (canonicalize (canonical, "pseudo", name) || + canonicalize (canonical, "attribute", name) || + canonicalize (canonical, "uda", name)) + { + a.attribute ("canonical", canonical); + } + else + { + a._lextype = Lexer::Type::word; + } + changes = true; } }