]> git.lyx.org Git - features.git/commitdiff
FindAdv: Expand the list of handled chars for dot below and ring above
authorKornel Benko <kornel@lyx.org>
Fri, 8 Mar 2019 21:44:00 +0000 (22:44 +0100)
committerKornel Benko <kornel@lyx.org>
Fri, 8 Mar 2019 21:44:00 +0000 (22:44 +0100)
src/lyxfind.cpp

index 83d99a10e4fb11eedd1767e4dd9df98f9d191426..8c11bdbe8e84ab804ae0dee421fa4ff017970798 100644 (file)
@@ -1298,7 +1298,8 @@ static void buildAccentsMap()
   buildaccent("acute", "aAcCeElLoOnNrRsSuUyYzZiI",
                        "áÁćĆéÉĺĹóÓńŃŕŔśŚúÚýÝźŹíÍ");
   buildaccent("dacute|H|h", "oOuU", "őŐűŰ");       // double acute
-  buildaccent("mathring|r", "uU", "ůŮ");
+  buildaccent("mathring|r", "aAuUwy",
+                            "åÅůŮẘẙ");  // ring
   accents["check{\\imath}"] = "ǐ";
   accents["check{\\jmath}"] = "ǰ";
   buildaccent("check|v", "cCdDaAeEiIoOuUgGkKhHlLnNrRsSTzZ",
@@ -1318,7 +1319,9 @@ static void buildAccentsMap()
                          "ăĂĕĔğĞĭĬŏŎŭŬ");    // breve
   accents["grave{\\imath}"] = "ì";
   buildaccent("grave|`", "aAeEiIoOuUnNwWyY",
-                         "àÀèÈìÌòÒùÙǹǸẁẀỳỲ");                // grave
+                         "àÀèÈìÌòÒùÙǹǸẁẀỳỲ");   // grave
+  buildaccent("subdot|d", "BbDdHhKkLlMmNnRrSsTtVvWwZzAaEeIiOoUuYy",
+                          "ḄḅḌḍḤḥḲḳḶḷṂṃṆṇṚṛṢṣṬṭṾṿẈẉẒẓẠạẸẹỊịỌọỤụỴỵ");  // dot below
 }
 
 /*
@@ -1329,7 +1332,7 @@ void Intervall::removeAccents()
 {
   if (accents.empty())
     buildAccentsMap();
-  static regex const accre("\\\\((.|grave|breve|lyxmathsym|ddot|dot|acute|dacute|mathring|check|hat|bar|tilde)\\{[^\\{\\}]+\\}|(i|imath|jmath)(?![a-zA-Z]))");
+  static regex const accre("\\\\((.|grave|breve|lyxmathsym|ddot|dot|acute|dacute|mathring|check|hat|bar|tilde|subdot)\\{[^\\{\\}]+\\}|(i|imath|jmath)(?![a-zA-Z]))");
   smatch sub;
   for (sregex_iterator itacc(par.begin(), par.end(), accre), end; itacc != end; ++itacc) {
     sub = *itacc;
@@ -1342,7 +1345,7 @@ void Intervall::removeAccents()
       }
       addIntervall(pos+val.size(), pos + sub.str(0).size());
       for (size_t i = pos+val.size(); i < pos + sub.str(0).size(); i++) {
-        // remove any remaining parentheses
+        // remove traces of any remaining chars
         par[i] = ' ';
       }
     }