diff --git a/docs/src/general/changelog.md b/docs/src/general/changelog.md index be2903ecd..0fec3112f 100644 --- a/docs/src/general/changelog.md +++ b/docs/src/general/changelog.md @@ -42,6 +42,7 @@ description: | - Fixed crash when [`symbol`]($func/symbol) function is called without arguments - Fixed access to label of certain content elements - Fixed line number in error message for CSV parsing +- Fixed invalid autocompletion after certain markup elements ## March 28, 2023 - **Breaking:** Enumerations now require a space after their marker, that is, diff --git a/src/ide/complete.rs b/src/ide/complete.rs index 27b199fd7..da9e07251 100644 --- a/src/ide/complete.rs +++ b/src/ide/complete.rs @@ -317,6 +317,8 @@ fn complete_field_accesses(ctx: &mut CompletionContext) -> bool { if ctx.leaf.range().end == ctx.cursor; if let Some(prev) = ctx.leaf.prev_sibling(); if prev.is::(); + if prev.parent_kind() != Some(SyntaxKind::Markup) || + prev.prev_sibling_kind() == Some(SyntaxKind::Hashtag); if let Some(value) = analyze_expr(ctx.world, &prev).into_iter().next(); then { ctx.from = ctx.cursor;