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

dedent in Snippet Markdown Plugin doesn't work for a single-line region #1686

Closed
3 tasks done
0x009922 opened this issue Dec 12, 2022 · 0 comments · Fixed by #1687
Closed
3 tasks done

dedent in Snippet Markdown Plugin doesn't work for a single-line region #1686

0x009922 opened this issue Dec 12, 2022 · 0 comments · Fixed by #1687
Labels
bug: pending triage Maybe a bug, waiting for confirmation

Comments

@0x009922
Copy link
Contributor

Describe the bug

I have the following snippet:

fn main() {
    // #region ipsum
    println!("Lorem ipsum");
    // #endregion ipsum
}

I am importing it with the syntax:

<<<@/snippets/lorem.rs#ipsum

The rendered result:

    println!("Lorem ipsum");

Reproduction

https://stackblitz.com/edit/vite-skqr7n

Expected behavior

Expected to see:

println!("Lorem ipsum");

and not

    println!("Lorem ipsum");

System Info

N/A

Additional context

I've almost created a PR with fix & tests.

Validations

  • Follow our Code of Conduct
  • Read the docs.
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
@0x009922 0x009922 added the bug: pending triage Maybe a bug, waiting for confirmation label Dec 12, 2022
0x009922 added a commit to 0x009922/vitepress that referenced this issue Dec 12, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 21, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug: pending triage Maybe a bug, waiting for confirmation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant