mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-03 08:28:25 +00:00
Forgot in previous commit to deal with case. As I'm doing it now,
it's easy to use the existing docstring routine, so I've commented out the string version of lowercase I had introduced. I've left the code in case someone else needs it later.
This commit is contained in:
parent
e5ea535952
commit
7b46aa8fbb
@ -1689,11 +1689,11 @@ void Text::dispatch(Cursor & cur, FuncRequest & cmd)
|
||||
// invalid after regex_match returns, since it is then
|
||||
// being given a temporary object. (Thanks to Georg for
|
||||
// figuring that out.)
|
||||
regex const link_re("^([a-zA-Z]+):.*");
|
||||
regex const link_re("^([a-z]+):.*");
|
||||
smatch matches;
|
||||
string const c = to_utf8(content);
|
||||
string const c = to_utf8(lowercase(content));
|
||||
|
||||
if (content.substr(0,7) == "mailto:") {
|
||||
if (c.substr(0,7) == "mailto:") {
|
||||
p["target"] = content;
|
||||
p["type"] = from_ascii("mailto:");
|
||||
} else if (regex_match(c, matches, link_re)) {
|
||||
|
@ -481,12 +481,14 @@ docstring const lowercase(docstring const & a)
|
||||
}
|
||||
|
||||
|
||||
/* Uncomment here and in lstrings.h if you should need this.
|
||||
string const lowercase(string const & a)
|
||||
{
|
||||
string tmp(a);
|
||||
transform(tmp.begin(), tmp.end(), tmp.begin(), local_lowercase());
|
||||
return tmp;
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
docstring const uppercase(docstring const & a)
|
||||
|
@ -96,8 +96,9 @@ docstring const ascii_lowercase(docstring const &);
|
||||
|
||||
/// Changes the case of \p s to lowercase.
|
||||
/// Does not depend on the locale.
|
||||
std::string const lowercase(std::string const & s);
|
||||
docstring const lowercase(docstring const & s);
|
||||
// Currently unused, but the code is there if needed.
|
||||
// std::string const lowercase(std::string const & s);
|
||||
|
||||
/// Changes the case of \p s to uppercase.
|
||||
/// Does not depend on the locale.
|
||||
|
Loading…
Reference in New Issue
Block a user