clarify link reference definition interruptions and continuation text
Other blocks can interrupt a link reference definition, and link reference definitions can have continuation text that is not fully prefixed, following the rules of paragraph continuation text.
Document both these facts and give examples.
Fixes #688.
See https://github.com/commonmark/commonmark-spec/issues/688#issuecomment-913242483.
I'm happy to adjust or remove the continuation text examples.
It doesn't fully describe the behavior of the current implementation yet:
- [aaa]: /
(According to the spec, this line is **not** the title, so this is not a continuation of the link
reference definition but a new paragraph that is the following sibling of the list rather than
a child of the list item.) foo bar
The current implementation handles the parenthesized text as the child of the list item, but according to the spec, even after applying this pull request, it should be a separate paragraph.
My proposal is to make link reference definitions an inline construct rather than a block construct, with the requirement that they must be at the beginning of a paragraph and end at the end of a line. We also need to specify that paragraphs containing only link reference definitions are not rendered at all, but are still counted as paragraphs when checking for list tightness commonmark/commonmark.js#269.
Alternatively, we could specify in addition to this pull request that a link reference definition can have an optional continuation text that is rendered as a paragraph in place of the link reference definition:
- [aaa]: / "title"
This is a continuation text of the link reference definition, so this is rendered as
a paragraph inside the list item.