🐛 include setext heading levels (Markdown) (#32987)

* 🐛 include setext heading levels

* 📝 typo

* 💚 use `===`
This commit is contained in:
Yu Zhang
2017-08-23 10:17:15 +08:00
committed by Matt Bierner
parent 949b9f1a79
commit 1c6f2f9a80
2 changed files with 16 additions and 3 deletions

View File

@@ -19,7 +19,7 @@ export default class MDDocumentSymbolProvider implements vscode.DocumentSymbolPr
public async provideDocumentSymbols(document: vscode.TextDocument): Promise<vscode.SymbolInformation[]> {
const toc = await new TableOfContentsProvider(this.engine, document).getToc();
return toc.map(entry => {
return new vscode.SymbolInformation(entry.text, vscode.SymbolKind.Namespace, '', entry.location);
return new vscode.SymbolInformation('#'.repeat(entry.level) + ' ' + entry.text, vscode.SymbolKind.Namespace, '', entry.location);
});
}
}