Link label: Collapse all internal whitespace?

The link label doc reads the following on normalization:

collapse consecutive internal spaces, tabs, and line endings to a single space

It is not clear whether the above refers to all instances or to the first instance. I think the spirit of the text is that all consecutive whitespace clusters ought to be collapsed. However, the dingus tool has been implemented to collapse the first only.

Which is correct, then? All instances or just the first?

I wanted to include dingus links but the system didn’t let me “post link to that host.”

Is there anything special I need to do to make the links postable?

eureton via CommonMark Discussion noreply@talk.commonmark.org
writes:

The link label doc reads the following on normalization:

collapse consecutive internal spaces, tabs, and line endings to a single space

It is not clear whether the above refers to all instances or to the first instance. I think the spirit of the text is that all consecutive whitespace clusters ought to be collapsed. However, the dingus tool has been implemented to collapse the first only.

Which is correct, then? All instances or just the first?

Yes, all instances. If you have an example where the dingus does
otherwise, you can link to it (put the whole url inside angle
brackets) or just paste in the input in a code block.

Good to know!

Angled brackets don’t work either. Code blocks below.

  • collapses first
    [foo][one
      two three]
    
    [one two three]: /url "title"
    
    produces
      <paragraph>
        <link destination="/url" title="title">
          <text>foo</text>
        </link>
      </paragraph>
    
  • doesn’t collapse second
    [foo][one two
      three]
    
    [one two three]: /url "title"
    
    produces
      <paragraph>
        <text>[</text>
        <text>foo</text>
        <text>]</text>
        <text>[</text>
        <text>one two</text>
        <softbreak />
        <text>three</text>
        <text>]</text>
      </paragraph>
    
1 Like

This is a bug in commonmark.js, it seems. Please report the issue there:

Never mind the issue – I’ve already fixed this (though the dingus will not be updated til the next release).