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

<pre> followed by empty line #1578

Closed
andreasplesch opened this issue Dec 7, 2019 · 3 comments
Closed

<pre> followed by empty line #1578

andreasplesch opened this issue Dec 7, 2019 · 3 comments

Comments

@andreasplesch
Copy link

Describe the bug
A pre tag html block is misrendered in the line following an initial empty line.

To Reproduce

  1. Marked Demo

  2. CommonMark Demo shows the same issue

The commonmark spec. explicitly treats pre tags as not being terminated by an empty line, to allow for proper rendering of white space. Both implementations seem non compliant.

Expected behavior
verbatim copying of text after pre tag as textcontent of a html pre element, until termination.

@UziTech
Copy link
Member

UziTech commented Dec 7, 2019

It looks like the issue is that the <div> tag doesn't have a blank line after it. demo
The ending </div> is not considered the end of the html block but a blank line is according to the spec.

According to this example the <pre> tag must have a blank line before it to act like a <pre> tag.

@UziTech
Copy link
Member

UziTech commented Dec 7, 2019

image

The yellow block is a markdown block and all other colors are HTML blocks.

@andreasplesch
Copy link
Author

andreasplesch commented Dec 7, 2019

Let me look up the language in the spec. but I do seem to recall that a closing tag suffices to terminate a div.

No, only an empty line closes, eg. is an end condition.

ok, let me close this.

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