diff --git a/services/web/frontend/js/features/source-editor/utils/tree-operations/outline.ts b/services/web/frontend/js/features/source-editor/utils/tree-operations/outline.ts index d43f1d2bd6..696610015c 100644 --- a/services/web/frontend/js/features/source-editor/utils/tree-operations/outline.ts +++ b/services/web/frontend/js/features/source-editor/utils/tree-operations/outline.ts @@ -114,9 +114,7 @@ export const enterNode = ( // This should already be in `items` return } - const name = - command.getChild('OptionalArgument')?.getChild('ShortOptionalArg') ?? - command.getChild('SectioningArgument')?.getChild('LongArg') + const name = command.getChild('SectioningArgument')?.getChild('LongArg') if (name == null || command == null) { return diff --git a/services/web/test/frontend/features/source-editor/languages/latex/latex-outline.test.ts b/services/web/test/frontend/features/source-editor/languages/latex/latex-outline.test.ts index 870f189bce..2547c6441a 100644 --- a/services/web/test/frontend/features/source-editor/languages/latex/latex-outline.test.ts +++ b/services/web/test/frontend/features/source-editor/languages/latex/latex-outline.test.ts @@ -435,13 +435,13 @@ describe('CodeMirror LaTeX-FileOutline', function () { view = makeView(content) }) - it('should use the optional argument as title', function () { + it('should use the long argument as title', function () { const outline = getOutline(view) expect(outline).to.deep.equal([ { from: 0, to: 30, - title: 'short title', + title: 'section', line: 1, level: SECTION_LEVEL, },