mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-23 02:14:50 +00:00
findadv: match \textbackslash and \textasciicircum also without trailing {} (fixes autotest findadv-re-02-in.txt).
This commit is contained in:
parent
9824926b4c
commit
6d05a96546
@ -556,7 +556,7 @@ Escapes const & get_regexp_escapes()
|
||||
escape_map.push_back(P(".", "_x_."));
|
||||
escape_map.push_back(P("\\", "(?:\\\\|\\\\backslash)"));
|
||||
escape_map.push_back(P("~", "(?:\\\\textasciitilde|\\\\sim)"));
|
||||
escape_map.push_back(P("^", "(?:\\^|\\\\textasciicircum\\{\\}|\\\\mathcircumflex)"));
|
||||
escape_map.push_back(P("^", "(?:\\^|\\\\textasciicircum\\{\\}|\\\\textasciicircum|\\\\mathcircumflex)"));
|
||||
escape_map.push_back(P("_x_", "\\"));
|
||||
}
|
||||
return escape_map;
|
||||
@ -589,12 +589,12 @@ Escapes const & get_regexp_latex_escapes()
|
||||
|
||||
static Escapes escape_map;
|
||||
if (escape_map.empty()) {
|
||||
escape_map.push_back(P("\\\\", "(?:\\\\\\\\|\\\\backslash|\\\\textbackslash\\{\\})"));
|
||||
escape_map.push_back(P("\\\\", "(?:\\\\\\\\|\\\\backslash|\\\\textbackslash\\{\\}|\\\\textbackslash)"));
|
||||
escape_map.push_back(P("(<?!\\\\\\\\textbackslash)\\{", "\\\\\\{"));
|
||||
escape_map.push_back(P("(<?!\\\\\\\\textbackslash\\\\\\{)\\}", "\\\\\\}"));
|
||||
escape_map.push_back(P("\\[", "\\{\\[\\}"));
|
||||
escape_map.push_back(P("\\]", "\\{\\]\\}"));
|
||||
escape_map.push_back(P("\\^", "(?:\\^|\\\\textasciicircum\\{\\}|\\\\mathcircumflex)"));
|
||||
escape_map.push_back(P("\\^", "(?:\\^|\\\\textasciicircum\\{\\}|\\\\textasciicircum|\\\\mathcircumflex)"));
|
||||
escape_map.push_back(P("%", "\\\\\\%"));
|
||||
}
|
||||
return escape_map;
|
||||
|
Loading…
Reference in New Issue
Block a user