We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
$
1 parent 2a862bc commit ab5cf74Copy full SHA for ab5cf74
src/uu/expr/src/syntax_tree.rs
@@ -185,14 +185,8 @@ impl StringOp {
185
| ('\\', false) => re_string.push(curr),
186
_ => re_string.push_str(r"\^"),
187
},
188
- '$' => {
189
- if is_end_of_expression(&pattern_chars) {
190
- re_string.push(curr);
191
- } else if !curr_is_escaped {
192
- re_string.push_str(r"\$");
193
- } else {
194
195
- }
+ '$' if !curr_is_escaped && !is_end_of_expression(&pattern_chars) => {
+ re_string.push_str(r"\$");
196
}
197
'\\' if !curr_is_escaped && pattern_chars.peek().is_none() => {
198
return Err(ExprError::TrailingBackslash);
0 commit comments