commonmark/commonmark-spec

Collapsible element markdown - links

vvasuki opened this issue · 1 comments

The spec does not elaborate on how it deals with markdown within collapsible elements. For example, consider the below

<details>
<summary>विस्तारः॥ (ईक्षितुम् अत्र नुदनीयम्।)</summary>
Consciousness joins other building blocks of the universe like space, time, mass. यथा Chalmers - [Ted2014](https://blog.ted.com/the-hard-problem-of-consciousness-david-chalmers-at-ted2014/) .

> यच् छ्रोत्रेण न शृणोति  
> येन श्रोत्रम् इदं श्रुतम् ।  
> तदेव ब्रह्म त्वं विद्धि  
> नेदं यद् इदम् उपासते ॥

</details>

This is rendered as
image

Though the quoted markdown is properly rendered, the link is not. Can you please update the spec and the reference implementation so that links are handled properly as well?

jgm commented

The spec does indeed fully specify how this is treated.
See the section on HTML blocks.
Both summary and details are block-level tags (see start condition 6 under sect. 4.6).

As the spec indicates, if you want the contents to be interpreted as markdown (rather than as HTML), then you need to leave a blank line.

<details>
<summary>विस्तारः॥ (ईक्षितुम् अत्र नुदनीयम्।)</summary>

Consciousness joins other building blocks of the universe like space, time, mass. यथा Chalmers - [Ted2014](https://blog.ted.com/the-hard-problem-of-consciousness-david-chalmers-at-ted2014/) .

> यच् छ्रोत्रेण न शृणोति  
> येन श्रोत्रम् इदं श्रुतम् ।  
> तदेव ब्रह्म त्वं विद्धि  
> नेदं यद् इदम् उपासते ॥

</details>