Skip to content

Commit

Permalink
Fix showing \item[] in document symbols (#1044)
Browse files Browse the repository at this point in the history
  • Loading branch information
pfoerster authored Mar 16, 2024
1 parent 102fbe3 commit d478e92
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

### Fixed

- Don't return document symbol with empty name if `\item[]` is encountered ([#1040](https://github.com/latex-lsp/texlab/issues/1040))

## [5.13.1] - 2024-03-16

### Fixed
Expand Down
1 change: 1 addition & 0 deletions crates/symbols/src/document/tex.rs
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ impl<'a> SymbolBuilder<'a> {
let name = enum_item
.label()
.and_then(|label| label.content_text())
.filter(|text| !text.is_empty())
.unwrap_or_else(|| "Item".into());

let symbol = match self.find_label(enum_item.syntax()) {
Expand Down

0 comments on commit d478e92

Please sign in to comment.