From ce462fd9189d47cfa0b0fad1d7f1525a1a9fc99f Mon Sep 17 00:00:00 2001 From: Jerome Lelong Date: Wed, 31 Jan 2024 17:39:50 +0100 Subject: [PATCH] Fix #4153 outline for macros and envs in doctex --- src/outline/structure/latex.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/outline/structure/latex.ts b/src/outline/structure/latex.ts index 1c112e0f1..1a58ba86a 100644 --- a/src/outline/structure/latex.ts +++ b/src/outline/structure/latex.ts @@ -148,7 +148,7 @@ async function parseNode( element = { type: TeXElementType.Environment, name: node.env, - label: `${node.env.charAt(0).toUpperCase()}${node.env.slice(1)}` + (config.caption && caption ? `: ${caption}` : ''), + label: `${node.env.charAt(0).toUpperCase()}${node.env.slice(1)}` + (config.caption && caption ? `: ${caption.content}` : ''), ...attributes } } else if ((node.type === 'environment' || node.type === 'mathenv') && config.macros.envs.includes(node.env)) {