Skip to content

Mixing sections and divs results in an invalid HTML #127

Closed
jgm opened this Issue · 2 comments

1 participant

@jgm
Owner

Pandoc 1.5.1.1 (at least, I'm not aware of older versions) results in an
invalid HTML with the following input:

<blockquote>

Heading
=======

Contents!

</blockquote>

with the following output:

<blockquote>
<div id="heading"
><h1
  >Heading</h1
  ><p
  >Contents!</p
  ></blockquote>

</div
>

Two consecutive sections enclosed in div shows the much worse behavior:

<div class="one">
Section 1
=========

Contents!

</div> 

<div class="two">
Section 2
=========

Contents again!

</div>

with the following output: (This HTML is valid by accident but far from
expected!)

<div class="one"><div id="section-1"
><h1
  >Section 1</h1
  ><p
  >Contents!</p
  ></div>

<div class="two"></div
><div id="section-2"
><h1
  >Section 2</h1
  ><p
  >Contents again!</p
  ></div>

</div
>

I consider this bug very significant since it prohibits the natural mixing
of Markdown and HTML. For now the only workaround seems to be writing
sections in HTML (i.e.

Section

).

Google Code Info:
Issue #: 239
Author: lifthras...@gmail.com
Created On: 2010-05-24T17:48:55.000Z
Closed On: 2010-05-25T06:22:36.000Z

@jgm jgm was assigned
@jgm jgm closed this
@jgm
Owner

Oops, I forgot changing the bug title: this applies to every HTML containers and not
just div elements.

Google Code Info:
Author: lifthras...@gmail.com
Created On: 2010-05-24T17:49:52.000Z

@jgm
Owner

This appears to be a dup of Issue #230.

Google Code Info:
Author: fiddloso...@gmail.com
Created On: 2010-05-25T06:22:36.000Z

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.