Skip to content

incorrect text inserted after nested spans #636

@mattneub

Description

@mattneub

Run the following:

s = <<END
<div class="navbar">
<span style="white-space:nowrap" markdown="1">
<span class="parent"><a href="tech">Technical Details</a></span>
</span>
&nbsp;&nbsp;&nbsp;
</div>
END
h = Kramdown::Document.new(
      s, :auto_ids => false, :entity_output => :numeric
).to_html
puts h

The output is:

<div class="navbar">
<span style="white-space:nowrap">
<span class="parent"><a href="tech">Technical Details</a></span></span>
&lt;/span&gt;
&nbsp;&nbsp;&nbsp;
</div>

The bug is the extra &lt;/span&gt; inserted into the text.

I can see a way of working around this, and I probably will do so; but this is new behavior that is affecting a longstanding web site of mine (though I can't specify the kramdown update in which the problem started, sorry) so perhaps it counts as a genuine bug.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions