Skip to content

White space handling looks inconsistent between HTML block element vs HTML inline element #303

Description

@seiyab

Hi. I'm curious about why white space preservation / removal differs between <div> and <a> in following case:

https://spec.commonmark.org/dingus/?text=%3Cdiv%20class%3D%22abc%0A%20%20%20%20d%20%20e%20f%22%3Etext%3C%2Fdev%3E%0A%0A%3Ca%20class%3D%22abc%0A%20%20%20%20d%20%20e%20f%22%3Etext%3C%2Fa%3E

Input:

<div class="abc
    d  e f">text</dev>

<a class="abc
    d  e f">text</a>

Output:

<div class="abc
    d  e f">text</dev>
<p><a class="abc
d  e f">text</a></p>

I've read https://spec.commonmark.org/0.31.2/ but it's not obvious whether it's a bug or intentional.
I came from https://github.com/orgs/micromark/discussions/211.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions