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

Support starting numbered lists with arbitrary number #211

Closed
winniehell opened this issue Jan 20, 2015 · 10 comments
Closed

Support starting numbered lists with arbitrary number #211

winniehell opened this issue Jan 20, 2015 · 10 comments
Assignees
Milestone

Comments

@winniehell
Copy link
Contributor

winniehell commented Jan 20, 2015

Allow numbered lists to have a defined offset like in CommonMark.

Current output:

$ kramdown --output kramdown <<< '5.  five
6.  six'

1.  five
2.  six

Expected:

$ kramdown --output kramdown <<< '5.  five
6.  six'

5.  five
6.  six

Especially useful in quotes:

$ kramdown --output kramdown <<< '> 42.  Question

What is it?'

should really be

> 42.  Question

What is it?
@gettalong gettalong self-assigned this Jan 21, 2015
@gettalong gettalong added this to the 2.0.0 milestone Jan 21, 2015
@gettalong
Copy link
Owner

Thanks for the issue. However, since this will change the output and probably break some documents, this can't be done in the 1.x release and has to wait for the 2.x release.

@winniehell
Copy link
Contributor Author

@gettalong 2.x would be great 👍

@Phrogz
Copy link

Phrogz commented Aug 3, 2015

👍 +1 particularly for inline quoted responses. When someone writes:

Some questions:

1. How big are your shoes?
2. Can a bullet ricochet off an armadillo?

And I respond with a quoting system that prefixes the input with >, and inject my responses:

> 1. how big are your shoes

Normal sized

> 2. Can a bullet ricochet off an armadillo?

[Apparently, yes.](http://www.bbc.com/news/world-us-canada-33748027)

The result is undesirable:


  1. how big are your shoes

Normal sized

  1. Can a bullet ricochet off an armadillo?

Apparently, yes.


My workaround hack is to wrap the quoted list items in backticks to preserve the typed value. :( Sadly, other users do not know (or want to know) such hacks.

@e9t
Copy link

e9t commented Aug 17, 2015

👍

@chimericdream
Copy link

Another option that I just found is to use an IAL declaration before the list. I was looking for this exact feature and was sad (at first) to learn that it isn't supported. However, the following works as desired:

{:start="3"}
1. test
1. test
1. test

Output:

3. test
4. test
5. test

Tested with this online Kramdown editor: https://kramdown.herokuapp.com/

This doesn't solve the problem for the average user who doesn't know much markdown, but it's a workaround for people using Kramdown in cases like Jekyll sites and whatnot.

@winniehell
Copy link
Contributor Author

@chimericdream That is awesome, thank you very much! 👍

However for quoting multiple list entries, this is a lot of overhead:

> {:start="42"}     
> 42. Question

Nobody knows!

> {:start="2016"}
> 2016. Current Year        

YOLO

@chimericdream
Copy link

However for quoting multiple list entries, this is a lot of overhead:

@winniehell I completely agree. I think it'd be awesome to have this baked into Kramdown core so that the list starts at the number of the first bullet. But for bloggers and power users, it's good to know that there is a fairly straightforward workaround until Kramdown 2.0 is final.

@gettalong
Copy link
Owner

Closed because feature request issues are now tracked through a dedicated project - see https://github.com/gettalong/kramdown/projects/1

@gettalong
Copy link
Owner

@cup There is nothing to fix here. It currently works as designed and this issue talks about changing the design which would be a breaking change.

@ghost
Copy link

ghost commented Dec 12, 2018

For anyone using GitHub Pages, you can simply add this to _config.yml:

markdown: CommonMarkGhPages

you dont even have to declare the plugin in _config.yml as its activated by
default:

http://github.com/github/pages-gem/blob/fb5c3f2/lib/github-pages/plugins.rb#L9

reference:

http://github.com/github/jekyll-commonmark-ghpages

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Feature Requests
Only in Next Major Version
Development

No branches or pull requests

5 participants