marp-team / marpit

The skinny framework for creating slide deck from Markdown
https://marpit.marp.app/
MIT License
964 stars 46 forks source link

Starting numbered lists from a number other than 1 #326

Closed mil-ad closed 2 years ago

mil-ad commented 2 years ago

marp markdown generates numbered lists starting from 1 and doesn't seem to support the start attr supported in CommonMarkdown/markdown-it. Is this a bug?

e.g.

5. A
6. B

generates

1. A
2. B
mil-ad commented 2 years ago

oops! my bad - this turns out to be caused by my CSS:

ol {
  li {
    display: block;
  }
  counter-reset: item;
  li::before {
    font-weight: bold;
    content: counter(item) ". ";
    counter-increment: item;
    color: $enumerate-color;
    position: absolute;
    left: -1.3em;
  }
}

Although I'm not sure how to fix it 😢