We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4bc08ca commit 5df23e6Copy full SHA for 5df23e6
crates/oxc_linter/src/rules/eslint/no_multi_str.rs
@@ -36,10 +36,8 @@ impl Rule for NoMultiStr {
36
if let AstKind::StringLiteral(literal) = node.kind() {
37
let source = literal.span.source_text(ctx.source_text());
38
// https://github.com/eslint/eslint/blob/9e6d6405c3ee774c2e716a3453ede9696ced1be7/lib/shared/ast-utils.js#L12
39
- let position = source
40
- .find(|ch|
41
- matches!(ch, '\r' | '\n' | '\u{2028}' | '\u{2029}')
42
- ).unwrap_or(0);
+ let position =
+ source.find(|ch| matches!(ch, '\r' | '\n' | '\u{2028}' | '\u{2029}')).unwrap_or(0);
43
if position != 0 {
44
// We found the "newline" character but want to highlight the '\', so go back one
45
// character.
0 commit comments