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

Correctly strip leading white-space from markdown #1831

Closed
wants to merge 1 commit into from

Conversation

jerrykan
Copy link
Contributor

If the markdown contains something that is indented by more that the leadingTabs/leadingWs then extra white space is incorrectly removed. ie the following example:

    <section data-markdown>
    some text
       indented text
          more indented text
    </section>

would result in the following markdown:

some text
   indented text
  more indented text

We can work around this problem by using a function to generate the
replace value.

If the markdown contains something that is indented by more that the
`leadingTabs`/`leadingWs` then extra white space is incorrectly removed.
ie the following example:

```
    <section data-markdown>
    some text
       indented text
          more indented text
    </section>
```

would result in the following markdown:

```
some text
   indented text
  more indented text
```

We can work around this problem by using a function to generate the
replace value.
@azat
Copy link

azat commented Feb 2, 2023

This patch does fixes the problem for markdown plugin, but it has conflicts, I've resubmitted it here (and kept the original author), hope someone can take a look, thank in advance!

@hakimel
Copy link
Owner

hakimel commented Feb 27, 2023

This commit was merged via #3358

@hakimel hakimel closed this Feb 27, 2023
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.

3 participants