Skip to content

Extra newlines between HTML blocks should be preserved #16

@tavianator

Description

@tavianator

stupicat turns this:

<p>
foo
</p>

<script>
let bar;

let baz;
</script>

into this:

<p>
foo
</p>
<script>
let bar;

let baz;
</script>

But apparently without the extra newline, pulldown-cmark doesn't think the <script> tag is its own block:

$ pulldown-cmark <foo.md
<p>
foo
</p>
<script>
let bar;

let baz;
</script>
$ cargo run --example stupicat -- foo.md | pulldown-cmark 
    Finished dev [unoptimized + debuginfo] target(s) in 0.02s
     Running `target/debug/examples/stupicat foo.md`
<p>
foo
</p>
<script>
let bar;
<p>let baz;
</script></p>

Obviously the tags in the middle of the <script> mangle everything.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions