mirror of
https://github.com/Myriad-Dreamin/tinymist.git
synced 2025-12-23 08:47:50 +00:00
Update lib.rs
This commit is contained in:
parent
d104890040
commit
df87bbee11
1 changed files with 7 additions and 7 deletions
|
|
@ -180,13 +180,13 @@ impl<'w> Linter<'w> {
|
|||
let mut markup_like: Option<Span> = None;
|
||||
|
||||
loop {
|
||||
if let Some(expr) = node.cast::<ast::Expr>() {
|
||||
if let Some(parent) = node.parent() {
|
||||
match parent.kind() {
|
||||
SyntaxKind::Code => return Some(expr.span()),
|
||||
SyntaxKind::Markup | SyntaxKind::Math => markup_like = Some(expr.span()),
|
||||
_ => {}
|
||||
}
|
||||
if let Some(expr) = node.cast::<ast::Expr>()
|
||||
&& let Some(parent) = node.parent()
|
||||
{
|
||||
match parent.kind() {
|
||||
SyntaxKind::Code => return Some(expr.span()),
|
||||
SyntaxKind::Markup | SyntaxKind::Math => markup_like = Some(expr.span()),
|
||||
_ => {}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue