Findadv: Add some missing accents.

They are defined in lib/unicodesymols, but were not handled yet.
This commit is contained in:
Kornel Benko 2019-07-30 15:21:56 +02:00
parent e4d30dd7f6
commit 8acbcebf11

View File

@ -1323,13 +1323,13 @@ static void buildAccentsMap()
accents["lyxmathsym{ß}"] = "ß"; accents["lyxmathsym{ß}"] = "ß";
accents["text{ß}"] = "ß"; accents["text{ß}"] = "ß";
accents["ddot{\\imath}"] = "ï"; accents["ddot{\\imath}"] = "ï";
buildaccent("ddot", "aAeEiIioOuUyY", buildaccent("ddot", "aAeEhHiIioOtuUwWxXyY",
"äÄëËïÏïöÖüÜÿŸ"); // umlaut "äÄëËḧḦïÏïöÖüÜẅẄẍẌÿŸ"); // umlaut
buildaccent("dot|.", "cCeEGgIizZaAoObBdDfFyY", buildaccent("dot|.", "aAbBcCdDeEfFGghHIimMnNoOpPrRsStTwWxXyYzZ",
"ċĊėĖĠġİİżŻȧȦȯȮḃḂḋḊḟḞẏẎ"); // dot{i} can only happen if ignoring case, but there is no lowercase of 'İ' "ȧȦḃḂċĊḋḊėĖḟḞĠġḣḢİİṁṀṅṄȯȮṗṖṙṘṡṠṫṪẇẆẋẊẏẎżŻ"); // dot{i} can only happen if ignoring case, but there is no lowercase of 'İ'
accents["acute{\\imath}"] = "í"; accents["acute{\\imath}"] = "í";
buildaccent("acute", "aAcCeElLoOnNrRsSuUyYzZiI", buildaccent("acute", "aAcCeEgGkKlLmMoOnNpPrRsSuUwWyYzZiI",
"áÁćĆéÉĺĹóÓńŃŕŔśŚúÚýÝźŹíÍ"); "áÁćĆéÉǵǴḱḰĺĹḿḾóÓńŃṕṔŕŔśŚúÚẃẂýÝźŹíÍ");
buildaccent("dacute|H|h", "oOuU", "őŐűŰ"); // double acute buildaccent("dacute|H|h", "oOuU", "őŐűŰ"); // double acute
buildaccent("mathring|r", "aAuUwy", buildaccent("mathring|r", "aAuUwy",
"åÅůŮẘẙ"); // ring "åÅůŮẘẙ"); // ring
@ -1339,14 +1339,14 @@ static void buildAccentsMap()
"čČďĎǎǍěĚǐǏǒǑǔǓǧǦǩǨȟȞľĽňŇřŘšŠŤťžŽ"); // caron "čČďĎǎǍěĚǐǏǒǑǔǓǧǦǩǨȟȞľĽňŇřŘšŠŤťžŽ"); // caron
accents["hat{\\imath}"] = "î"; accents["hat{\\imath}"] = "î";
accents["hat{\\jmath}"] = "ĵ"; accents["hat{\\jmath}"] = "ĵ";
buildaccent("hat|^", "aAeEiIcCgGhHjJsSwWyYzZoOuU", buildaccent("hat|^", "aAcCeEgGhHiIjJoOsSuUwWyYzZ",
"âÂêÊîÎĉĈĝĜĥĤĵĴŝŜŵŴŷŶẑẐôÔûÛ"); // circ "âÂĉĈêÊĝĜĥĤîÎĵĴôÔŝŜûÛŵŴŷŶẑẐ"); // circ
accents["bar{\\imath}"] = "ī"; accents["bar{\\imath}"] = "ī";
buildaccent("bar|=", "aAeEiIoOuUyY", buildaccent("bar|=", "aAeEiIoOuUyY",
"āĀēĒīĪōŌūŪȳȲ"); // macron "āĀēĒīĪōŌūŪȳȲ"); // macron
accents["tilde{\\imath}"] = "ĩ"; accents["tilde{\\imath}"] = "ĩ";
buildaccent("tilde", "aAnNoOiIuU", buildaccent("tilde", "aAeEiInNoOuUvVyY",
"ãÃñÑõÕĩĨũŨ"); // tilde "ãÃẽẼĩĨñÑõÕũŨṽṼỹỸ"); // tilde
accents["breve{\\imath}"] = "ĭ"; accents["breve{\\imath}"] = "ĭ";
buildaccent("breve|u", "aAeEgGiIoOuU", buildaccent("breve|u", "aAeEgGiIoOuU",
"ăĂĕĔğĞĭĬŏŎŭŬ"); // breve "ăĂĕĔğĞĭĬŏŎŭŬ"); // breve
@ -1373,6 +1373,8 @@ static void buildAccentsMap()
accents["textroundcap{\\i}"] = "ȉ"; accents["textroundcap{\\i}"] = "ȉ";
buildaccent("rcap|textroundcap", "AaEeIiOoRrUu", buildaccent("rcap|textroundcap", "AaEeIiOoRrUu",
"ȂȃȆȇȊȋȎȏȒȓȖȗ"); // inverted breve "ȂȃȆȇȊȋȎȏȒȓȖȗ"); // inverted breve
buildaccent("slashed", "oO",
"øØ"); // slashed
} }
/* /*
@ -1383,7 +1385,7 @@ void Intervall::removeAccents()
{ {
if (accents.empty()) if (accents.empty())
buildAccentsMap(); buildAccentsMap();
static regex const accre("\\\\(([\\S]|grave|breve|lyxmathsym|text|ddot|dot|acute|dacute|mathring|check|hat|bar|tilde|subdot|ogonek|cedilla|subring|textsubring|subhat|textsubcircum|subtilde|textsubtilde|dgrave|textdoublegrave|rcap|textroundcap)\\{[^\\{\\}]+\\}|(i|imath|jmath)(?![a-zA-Z]))"); static regex const accre("\\\\(([\\S]|grave|breve|lyxmathsym|text|ddot|dot|acute|dacute|mathring|check|hat|bar|tilde|subdot|ogonek|cedilla|subring|textsubring|subhat|textsubcircum|subtilde|textsubtilde|dgrave|textdoublegrave|rcap|textroundcap|slashed)\\{[^\\{\\}]+\\}|(i|imath|jmath)(?![a-zA-Z]))");
smatch sub; smatch sub;
for (sregex_iterator itacc(par.begin(), par.end(), accre), end; itacc != end; ++itacc) { for (sregex_iterator itacc(par.begin(), par.end(), accre), end; itacc != end; ++itacc) {
sub = *itacc; sub = *itacc;