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

Allow multiple hyphens to be used to create a nested list item #1136

Closed
mojavelinux opened this issue Oct 10, 2014 · 6 comments
Closed

Allow multiple hyphens to be used to create a nested list item #1136

mojavelinux opened this issue Oct 10, 2014 · 6 comments
Assignees

Comments

@mojavelinux
Copy link
Member

Between 1 and 5 asterisks can be used to create a list item, but only 1 hyphen can be used. Thus, while it's possible to use asterisks to create nested list items:

* item 1
** 1a
** 1b

It's not possible to use only hyphens to create list items. Under this proposal, the following syntax would be permitted for creating nested list items:

- item 1
-- 1a
-- 1b

Double hyphen is already used in several places in the AsciiDoc syntax:

  • open block delimiter
  • dash replacement
  • attribution for the shorthand blockquote form

We don't anticipate than any of these scenarios will conflict with the use of multiple hyphens for nested list items. If you know of a case, please cite it.

@mojavelinux mojavelinux self-assigned this Oct 10, 2014
@mojavelinux mojavelinux added this to the v1.6.0 milestone Oct 10, 2014
@mojavelinux
Copy link
Member Author

The following case would produce different results. It will create a nested list item instead of a dash.

term1::
  def1
  -- and a note

In this case, an open block would need to be used to prevent the match.

term1::
+
--
def1
-- and a note
--

or the definition would need to be moved to one line:

term1::
  def1 -- and a note

@mojavelinux mojavelinux modified the milestones: v1.6.0, v1.7.0 Dec 21, 2015
@mojavelinux
Copy link
Member Author

I'm less convinced now that we should do this. The hyphen is really a special case and asterisks should be preferred.

Can someone cite another markup language that uses repeating hyphens for list items?

@mojavelinux mojavelinux modified the milestones: discussion, v1.7.0 May 26, 2017
@u0421793
Copy link

What if it were

  • first level
    -> next level
    ->> even nexter level

Could that work for lists that have an order?
. first level
.> next level
.>> even more of that

or would that get accidentally interpreted as the closing tag of <>

@mojavelinux
Copy link
Member Author

The more I've worked with AsciiDoc, the more I'm convinced allowing multiple hyphens is a bad idea. We don't want to add more ways to do things. The preferred way is multiple asterisks. Hyphens remain an alternate way to create the top level list, but should not really be used otherwise.

@mojavelinux mojavelinux removed this from the discussion milestone Oct 25, 2017
@RichardJECooke
Copy link

Why don't you allow hyphens? Asterisks take far longer to type. This is the first thing I googled now that I'm learning asciidoc

@elextr
Copy link

elextr commented Aug 5, 2021

Agree with @mojavelinux, dash is already so heavily overloaded in Asciidoc (emdash and open block and listing block, oh and dash and minus if you do math) that there is no clear backward compatible way to allow multiple levels of list using only dash as the markup character.

Perhaps you are using a different keyboard layout, but on the most common keyboard layouts asterisk is a shifted key, it takes no longer to type.

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

4 participants