Closed raphtlw closed 2 years ago
This doesn't seem to work. Here is the output:
Notion:
Result:
Hey @raphtlw, my bad. By mistake I merged this PR. I have reverted your commits, feel free to create a new PR.
@souvikinator Could you try using the NPM package I published containing my changes? It worked for me and I'm even using it in production.
It's still not working. The whole thing is still in bullet format. That's weird. Can you share an example from production where I can see how it is being rendered?
@souvikinator Apologies, my dumbass was drunk and thought it was a good idea to remove the function call that adds the numbers to the bullet points 😆 I'll create another pull request and test the fix once more.
It worked in development for me, not production and I was just puzzled as to why that was the case, turns out, the development build still had the function call, but not the one in production
@souvikinator I've created a new PR #38 which fixes this issue, and includes a link where it's being used in production. Once again, thank you for creating this package, it helps a lot.
P.S. The drunk thing was just a joke, I just missed a minor detail by accident as I wanted to quickly go to sleep.
😂 no worries. I'll test it locally and let you know.
This fixes issue #18 and even supports nested list items.
I solved this problem by introducing a new hook function that runs after each block's children is listed. I then "inject" a new property into the block object
number
, which just increments from 1 to max, and then in the rendering stage, use the property to render the numbered list bullets.Result:
🎉