mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-28 20:32:28 +00:00
Adv-Find: Add handling for \cdot (at least if using format-search
This commit is contained in:
parent
39b3a9b855
commit
be50eb507f
@ -1295,6 +1295,7 @@ static void buildAccentsMap()
|
|||||||
accents["imath"] = "ı";
|
accents["imath"] = "ı";
|
||||||
accents["i"] = "ı";
|
accents["i"] = "ı";
|
||||||
accents["jmath"] = "ȷ";
|
accents["jmath"] = "ȷ";
|
||||||
|
accents["cdot"] = "·";
|
||||||
accents["lyxmathsym{ß}"] = "ß";
|
accents["lyxmathsym{ß}"] = "ß";
|
||||||
accents["text{ß}"] = "ß";
|
accents["text{ß}"] = "ß";
|
||||||
accents["ddot{\\imath}"] = "ï";
|
accents["ddot{\\imath}"] = "ï";
|
||||||
@ -1360,7 +1361,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|slashed)\\{[^\\{\\}]+\\}|(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|cdot)(?![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;
|
||||||
@ -1371,7 +1372,11 @@ void Intervall::removeAccents()
|
|||||||
for (size_t i = 0; i < val.size(); i++) {
|
for (size_t i = 0; i < val.size(); i++) {
|
||||||
par[pos+i] = val[i];
|
par[pos+i] = val[i];
|
||||||
}
|
}
|
||||||
addIntervall(pos+val.size(), pos + sub.str(0).size());
|
// Remove possibly following space too
|
||||||
|
if (par[pos+sub.str(0).size()] == ' ')
|
||||||
|
addIntervall(pos+val.size(), pos + sub.str(0).size()+1);
|
||||||
|
else
|
||||||
|
addIntervall(pos+val.size(), pos + sub.str(0).size());
|
||||||
for (size_t i = pos+val.size(); i < pos + sub.str(0).size(); i++) {
|
for (size_t i = pos+val.size(); i < pos + sub.str(0).size(); i++) {
|
||||||
// remove traces of any remaining chars
|
// remove traces of any remaining chars
|
||||||
par[i] = ' ';
|
par[i] = ' ';
|
||||||
|
Loading…
x
Reference in New Issue
Block a user