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

Region Folding requires start and end tags to have region name but vscode/jetbrains does not #1828

Closed
JonathanTurnock opened this issue Aug 20, 2024 · 0 comments · Fixed by #1908
Labels
bug Something isn't working

Comments

@JonathanTurnock
Copy link

JonathanTurnock commented Aug 20, 2024

Describe the bug

I stumbled upon this issue when attempting to debug why region imports were not working.

Turns out because the #endregion didn't have the region name it wasn't matching.

I don't think this is an issue per se but the docs should highlight and give a working example if its not going to be resolved as I spent about an hour debugging the issue and would not want someone else to have the same experience. Regardless I wanted to raise so its discoverable.

Minimal reproduction

Create a new presentation, add a js file, i.e. index.js

Add the following codeblock

// #region example
console.log("Should only see me")
// #endregion

console.log("Should not see me")

Add a new presentation with import

# Example

<<< @/index.js#example

Observe that the whole file is imported, adding example to the #endregion fixes the issue but the vscode docs don't mention anything about needing the name on the endregion and the sli.dev docs don't hint at a working example

Reproduction: https://stackblitz.com/edit/github-hczjns?file=index.js

Environment

  • Slidev version: v0.49.26
  • Browser: Version 127.0.6533.120 (Official Build) (arm64)
  • OS: MacOS Sonoma 14.5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants