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

Handles indentation inside pre-formatted Markdown blocks #184

Merged
merged 5 commits into from
May 20, 2019

Conversation

davidmerfield
Copy link
Owner

@davidmerfield davidmerfield commented May 20, 2019

Pandoc is very strict and treats indents inside HTML blocks as code blocks. This is correct but bad user experience. For instance Pandoc converts this:

<table>
    <td>[Hey!](/goo)</td>
</table>

Into:

<table>
<pre><code><td>[Hey!](/goo)</td></code></pre>
</table>

This is technically correct but not desirable behaviour. We want to mix HTML and Markdown in the same file. So I wrote a function to collapse the indentation for the contents of an HTML tag. More discussion of this issue


  • Fix a bug in the indent-stripping function so that it will no longer remove the indents for pre formatted text.

@davidmerfield davidmerfield merged commit 2e4558e into master May 20, 2019
@davidmerfield davidmerfield deleted the fixes-indents branch May 20, 2019 17:21
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