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

Disable "indented code" feature? #157

Open
cjohansen opened this issue Dec 11, 2019 · 3 comments
Open

Disable "indented code" feature? #157

cjohansen opened this issue Dec 11, 2019 · 3 comments

Comments

@cjohansen
Copy link

I put some HTML in a markdown file, nad markdown-clj treated parts of it as an indented code block. This differs from the pegdown parser I switched from. E.g.:

<div class="grid-container">
  <div class="child1">
    <p>Element #1</p>
  </div>
</div>

Passing this through the parser I get <p>Element #1</p> extracted as a verbatim code sample, which is not what I wanted. Any way to work around this?

@yogthos
Copy link
Owner

yogthos commented Dec 11, 2019

Not at the moment, the parser isn't HTML aware, so while it will leave tags alone, it doesn't actually understand their semantics.

@cjohansen
Copy link
Author

But at the very least, I would only expect four spaces indent to trigger a code block if the block is surrounded by blank lines? So in my eca, even if the parser is not html aware, the presence of text on the immediate line before which is not four space indented should prevent the creation of a code block?

@yogthos
Copy link
Owner

yogthos commented Dec 11, 2019

That actually looks like a bug where the parser doesn't check if the last line was empty before checking for the 4 space indent. I guess it just hasn't come up until now.

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

No branches or pull requests

2 participants