Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Description lists with tight and loose syntax #327

Open
digitalmoksha opened this issue Jun 27, 2023 · 2 comments
Open

Description lists with tight and loose syntax #327

digitalmoksha opened this issue Jun 27, 2023 · 2 comments

Comments

@digitalmoksha
Copy link
Collaborator

digitalmoksha commented Jun 27, 2023

What do you think about supporting the tight and loose syntax as laid out by jgm in https://github.com/jgm/commonmark-hs/blob/master/commonmark-extensions/test/definition_lists.md?

This follows the style of lists in general, where a tight list doesn't wrap the content in a paragraph, and the loose list does. So this would be valid

one
: two
: three

and generate this

<dl>
<dt>one</dt>
<dd>two
</dd>
<dd>three
</dd>
</dl>

and this would be valid

one

: two

: three

and generate this

<dl>
<dt>one</dt>
<dd>
<p>two</p>
</dd>
<dd>
<p>three</p>
</dd>
</dl>

I think what is there currently is mostly a subset of that spec. The spec adds a tight list (no blank line necessary), support for ~ as a marker, and allows for multiple definitions for each term.

@kivikakk
Copy link
Owner

SGTM — I like the idea of making the tight/loose distinction more widely used, since it's a bit obscure as it is and is often a source of confusion.

@digitalmoksha
Copy link
Collaborator Author

From my comment in #462

Waffling on this one. "Tight" and "loose" lists add complexity, and is not well understood by users. Most implementations I've seen do support the distinction. However not supporting it means styling the list would be easier and less complex. 🤷

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

No branches or pull requests

2 participants