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 #3358

Merged
merged 1 commit into from
Feb 27, 2023

Conversation

azat
Copy link

@azat azat commented Feb 2, 2023

Note, this is resubmit of #1831 (cc: @jerrykan)

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
Author

azat commented Feb 9, 2023

Any news on this one?

@Martinomagnifico maybe you can take a look? (Since you closed #3323, and apparently you are familiar with the code base).

Thanks in advance.

@Martinomagnifico
Copy link
Collaborator

Yeah I closed that one because you said “Forget about it”. My knowledge about Markdown handling is limited however.

@azat
Copy link
Author

azat commented Feb 9, 2023

Understand, thanks. It will be great if you could ping someone else who had knowledge about Markdown (or maybe I should use git blame and ping by myself, or maybe I just need to wait more time?)

azat added a commit to azat/presentations that referenced this pull request Feb 9, 2023
@azat
Copy link
Author

azat commented Feb 23, 2023

Friendly ping on this one, maybe this will bring someones attention...

@hakimel hakimel merged commit 0c9bdea into hakimel:master Feb 27, 2023
@hakimel
Copy link
Owner

hakimel commented Feb 27, 2023

Thanks @jerrykan @azat — I tried this out and the fix seems to be working very well.

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.

4 participants