mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
[cm6] show full title for section outline (#14100)
* [cm6] prefer showing full title in outline for sections * fix test * remove fallback * test rename GitOrigin-RevId: ac7a2a2c4fa7740a51661710953c85f03394292f
This commit is contained in:
parent
d3fabbc3e3
commit
67632212d7
2 changed files with 3 additions and 5 deletions
|
@ -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
|
||||
|
|
|
@ -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,
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue