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

Tab indented list item causes list-item-spacing error for all list items #78

Closed
sindresorhus opened this issue Aug 1, 2016 · 13 comments
Labels
🙋 no/question This does not need any changes

Comments

@sindresorhus
Copy link

Fixture

# Foo

- [Java](https://github.com/akullpp/awesome-java)
    - [RxJava](https://github.com/eleventigers/awesome-rxjava)
- [Kotlin](https://github.com/KotlinBy/awesome-kotlin)
- [OCaml](https://github.com/rizo/awesome-ocaml)
- [ColdFusion](https://github.com/seancoyne/awesome-coldfusion)
- [Fortran](https://github.com/rabbiabram/awesome-fortran)
- [.NET](https://github.com/quozd/awesome-dotnet)
- [PHP](https://github.com/ziadoz/awesome-php)
- [Delphi](https://github.com/Fr0sT-Brutal/awesome-delphi)
- [Assembler](https://github.com/brainblowjob/awesome-asm)
- [AutoHotkey](https://github.com/ahkscript/awesome-AutoHotkey)
- [AutoIt](https://github.com/J2TeaM/awesome-AutoIt)
- [Crystal](https://github.com/veelenga/awesome-crystal)
- [TypeScript](https://github.com/dzharii/awesome-typescript)

Result

   4:60-5:1   error    Missing new line after list item              list-item-spacing
   5:55-6:1   error    Missing new line after list item              list-item-spacing
   6:49-7:1   error    Missing new line after list item              list-item-spacing
   7:64-8:1   error    Missing new line after list item              list-item-spacing
   8:59-9:1   error    Missing new line after list item              list-item-spacing
  9:50-10:1   error    Missing new line after list item              list-item-spacing
  10:47-11:1  error    Missing new line after list item              list-item-spacing
  11:59-12:1  error    Missing new line after list item              list-item-spacing
  12:59-13:1  error    Missing new line after list item              list-item-spacing
  13:64-14:1  error    Missing new line after list item              list-item-spacing
  14:53-15:1  error    Missing new line after list item              list-item-spacing
  15:57-16:1  error    Missing new line after list item              list-item-spacing

No errors when the RxJava item is removed.

@sindresorhus sindresorhus changed the title Indented list item causes list-item-spacing error for all list items Tab indented list item causes list-item-spacing error for all list items Aug 1, 2016
@wooorm
Copy link
Member

wooorm commented Aug 1, 2016

Yup, that’s by design, you can turn it off though (in fact, that’s what I’m often doing!)

@sindresorhus
Copy link
Author

An indented list item is not an empty line though. It's still part of the list.

@wooorm
Copy link
Member

wooorm commented Aug 1, 2016

This rule switches based on whether there are list-items with more than one lines (not necessarily blank or empty lines), or not.

Or are you saying that the second list-item is part of the upper list (and not a new, nested list)? In that case, I don’t believe so (the second is preceded by a\t):

- [Java](https://github.com/akullpp/awesome-java)
    - [RxJava](https://github.com/eleventigers/awesome-rxjava)
- [Kotlin](https://github.com/KotlinBy/awesome-kotlin)
    - [RxJava](https://github.com/eleventigers/awesome-rxjava)
- [OCaml](https://github.com/rizo/awesome-ocaml)

Yields:

@sindresorhus
Copy link
Author

you can turn it off though (in fact, that’s what I’m often doing!)

Shouldn't that be a sign that the rule is broken.

@sindresorhus
Copy link
Author

sindresorhus commented Aug 1, 2016

I'm saying that it makes no sense not to allow:

- [Java](https://github.com/akullpp/awesome-java)
    - [RxJava](https://github.com/eleventigers/awesome-rxjava)
- [OCaml](https://github.com/rizo/awesome-ocaml)

The rule, from its description, is meant to prevent cases like:

- [Java](https://github.com/akullpp/awesome-java)

- [RxJava](https://github.com/eleventigers/awesome-rxjava)

- [OCaml](https://github.com/rizo/awesome-ocaml)

@wooorm
Copy link
Member

wooorm commented Aug 1, 2016

Pff, we’re talking about style here! It’s personal!

in fact, that’s what I’m often doing!

...is because I changed my preferences. I really like the rule for readability in markdown, but I don’t like how the extra lines render to HTML, such as on GH.

The rule, from its description, is meant to prevent cases like

I’m open to changing the description, let me know if you have suggestions!

@sindresorhus
Copy link
Author

I get it's about style, but the rule is being very inconsistent...

What's the correct way to do an indented list item then?

@wooorm
Copy link
Member

wooorm commented Aug 2, 2016

I feel the confusion for this will pass once GH-81 lands, so I’m deferring talk (if still required) to that place!

According the markdown-style-guide, any list-item which spans more than one line, taints the whole list, and requires it to have a blank line between each item.

@wooorm wooorm closed this as completed Aug 2, 2016
@sindresorhus
Copy link
Author

I feel the confusion for this will pass once GH-81 lands

I don't see how that is related at all. I explicitly turned this rule on and got confused by its unintuitive behavior.

According the markdown-style-guide, any list-item which spans more than one line, taints the whole list, and requires it to have a blank line between each item.

Sometimes it's better to be intuitive than "correct". But doesn't matter, I'll just fork the rules I don't agree with.

@wooorm wooorm reopened this Aug 6, 2016
@wooorm wooorm closed this as completed in d7abf05 Aug 6, 2016
@wooorm
Copy link
Member

wooorm commented Aug 6, 2016

You’re right, I added a better description!

@wooorm
Copy link
Member

wooorm commented Aug 6, 2016

But doesn't matter, I'll just fork the rules I don't agree with.

I’d be glad to maintain take care of the non-awesome-related ones in this project 👍

@sindresorhus
Copy link
Author

Sure, will do a PR at some point, but I don't have time for doing those rules right now.

@Kristinita
Copy link

@woorm, I opened the issue in official markdown-style-guide repository. New lines after list items not needed for sindresorhus example.

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🙋 no/question This does not need any changes
Development

No branches or pull requests

3 participants