Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add outline plugin #23

Merged
merged 8 commits into from
Apr 10, 2019
Merged

Add outline plugin #23

merged 8 commits into from
Apr 10, 2019

Conversation

yhatt
Copy link
Member

@yhatt yhatt commented Apr 8, 2019

Add a markdown-it plugin called outline plugin, to be recognized slide pages by VS Code's outline pane. It can jump to the other slide page easily.

In addition, it would allow to fold the code of slide contents per page.

The added plugin will manipulate parsed tokens to add the invisible header token before each slides as the virtual <h0> element. They have a line data mapped to the divider, and VS Code's Markdown support would process them well.

Experimental?

At first, we want to release this as an experimental feature because of some restrictions:

  • VS Code disallows to show custom text in outline pane, so the top level list would fill by --- in most cases. We are not yet sure if it is good or bad.
  • Outline pane will show the sorted outline by the content of corresponding line. It has no problem in typical usage, but it may break order of slides when Markdown used some different dividers.
    • 👉 It seems that it resolves just by changing sort setting from context menu: "Sort By: Position".
  • headingDivider global directive is not yet supported. It may require a feedback to Marpit.
    • 👉 Updated Marpit has improved line mapping in heading divider.

UPDATE: Our fears almost could resolve. We will ship as non-experimental feature with add notes to README.md.

We might add the separated panel to show detailed outline by depending on the feedback, just like vscode-reveal.

It can show outline and can fold code per slides.
@yhatt yhatt changed the title [Experimental] Add outline plugin Add outline plugin Apr 10, 2019
@yhatt yhatt merged commit 091353c into master Apr 10, 2019
@yhatt yhatt deleted the experimental-outline branch April 10, 2019 04:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant