question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Outline widget should be able to parse Markdown and reStructuredText for headings

See original GitHub issue

Summary:

The Outline widget should be able to parse Markdown and reStructuredText for headings.

Details:

I tend to use Spyder for pretty much everything related to a Python project: .py files of course, but also YAML files for continuous integration services and markdown or reStructuredText for README files. Right now, when editing a .md or .rst file, the Outline Explorer is greyed out and contains the most recent .py file’s outline.

These readme files can get quite long and being able to see the full outline would be quite a nifty feature, especially if combined with #2192. Imagine clicking on a section in the Outline widget not only brought you to that section of the code (as it does now), but also scrolls the rendered text from #2192 to the correct section.

I think that just headings/sections would be a good place to start. I’m not sure what other items would be easily mappable to the Outline.

Icons could be a circle surrounding a number, denoting what Atx-style header is being used (1 for H1, 3 for H3, etc.). Figuring out the header level for Setext-style Markdown headers and reStructuredText headers will be a little harder.

Example:

Given the following Markdown,

# Main Title

## SubSection
+ Bullet 1
+ Bullet 2
+ Bullet 3

## Another SubSection
Here be dragons

#### SubSubSection1
Text

#### SubSubSection2
More Text

## 3rd SubSection
End of document

the Outline would look like:

- Main Title
  + SubSection
  - Another SubSection
    + SubSubSection1
    + SubSubSection2
  + 3rd SubSection

Issue Analytics

  • State:open
  • Created 8 years ago
  • Comments:7 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
goanpecacommented, Nov 27, 2019
0reactions
ccordoba12commented, Nov 27, 2019

Sure, once we migrate to the outline explorer to use the LSP, then this feature will depend on the server itself.

Read more comments on GitHub >

github_iconTop Results From Across the Web

reStructuredText Markup Specification - Docutils - SourceForge
The reStructuredText parser is a component of Docutils. Simple, implicit markup is used to indicate special constructs, such as section headings, ...
Read more >
GitLab Flavored Markdown (GLFM)
GitLab Flavored Markdown extends the standard Markdown standard so that all Markdown-rendered headers automatically get IDs, which can be linked to, except in ......
Read more >
Parsing Markdown into an Automated Table of Contents
This tutorial will show you how to parse long Markdown text to HTML and then generate a list of links from the headings....
Read more >
Docs Markup and Syntax Guide - ODK Docs
Sphinx and reStructuredText can be very flexible. ... Normally, the title of the page should be the first line of the file, underlined...
Read more >
Print Directory & File Structure with icons for representation in ...
I have found 2 possible solutions. 1) Use charset ascii and simply copy/paste the output in the markdown file tree -L 1 --charset=ascii....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found