Open dom-linkevicius opened 5 months ago
bump Just to restate the problem more succinctly: I think DocumenterVitepress.jl
contains a bug where it ignores the value of the first number of a numbered list and always starts off with 1
whereas Markdown numbered lists start off with the value of the first number and ignore the values of the subsequent numbers. So if I write something like
4. abcd
$1+1$
```somecode```
5. qwer
6. zxcv
9. hgdd
I should get (w.r.t. numbering):
some code
but I get (w.r.t numbering):
some code
1) qwer
4) zxcv
4) hgddWhat happens if you indent the content you want to place in the link? MarkdownAST should then pick it up as being part of the list element, not totally new text.
If I do
4. abcd
$1+1$
```somecode```
5. qwer
6. zxcv
9. hgdd
I get
somecode
so they are all in the same list, but numbering still starts off not how it does in Markdown. Moreover, the indentation solution falls apart when I want to add
::: details
This is a details block.
:::
to be between 1. and 2., so something like
4. abcd
::: details
This is a details block.
:::
5. qwer
6. zxcv
9. hgdd
(spaces above/below the details block I think are necessary otherwise the detail block doesn't work properly) then it does strange things that are not what I want. I think the main problem is that the initial number 4. is ignored and turned into 1. If setting of the initial number worked as it does in plain Markdown then this would be easy.
One workaround is simply to use raw HTML as follows:
```@raw html
<ol start="4">
<li>qwe</li>
</ol>
\\```
(\\ is just to not trigger end of code block in the comment) which starts an ordered list with the number 4.
Vitepress accepts HTML in Markdown, so this would be a good way to do it.
Hi,
I am trying to create an enumerated list using DocumenterVitepress, but it's rendering not quite what I would want/expect. For example, if I do
it renders what it's supposed to render, i.e. a list of numbers 1-4 with the three letters. However, if I want to do something like
it renders (spaces between number and dot are there to prevent the github markdown kicking in which actually does what I'd want it to) 1 . qwe $1+1$ 1 . abc 2 . zxc 3 . ert
The problem is that instead of
``1+1``
I want to add::: details
containers for each item in the enumerated list, so it can't be in the same line. Am I missing something obvious on how to do it?