-
Notifications
You must be signed in to change notification settings - Fork 0
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
fix: Numbered Lists not incremental #58
Conversation
parser/__tests__/parser.test.js
Outdated
@@ -356,6 +356,7 @@ describe("parseParagraph", () => { | |||
...paragraph, | |||
bullet: { nestingLevel: 1, listId: "list-id" }, | |||
}; | |||
documentContext.orderedList = 1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you add some more test cases for:
- No orderedList set (should use the default)
- More than one item (so the number goes up)
- Multiple numbered lists in the same document
- Multiple lists, both numbered and unnumbered in the same document
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
noted
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm having troubles getting the testsuite to write more than 1 line. adding \n
makes the second line be part of the same Item, on a new line, padded.
Could you please give me an example test which has more than 1 item?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
try using whatever gdocs returns for the doc that is causing this issue (after changing it to not be so verbose, of course)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @buddy-web3 , are you still working on this PR?
As far as I can tell, @mruwnik 's requested test cases haven't yet been added. Is this right? If so, happy to try to add the requested cases.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I reckon you can take this over
While this does make the markdown a little more clearly human-readable, that's not really a high priority as all the outlets I'm currently aware of are machine-parsed and rendered into other forms. The markdown spec dictates that numbered lists are allowed to all be prefixed with the same number, and it's up to the renderer to behave correctly so the existing behaviour is entirely supported. Is this something worth spending extra complexity on? Sorry if this has already been talked about elsewhere - I'm very out of all of the loops lately :) |
@ChrisRimmer
|
Fair enough. Erroneous gaps between list items seems like the more important thing to fix but who am I to dictate, I haven't worked on this in almost a year 😅 |
Rendered obsolete by #61 |
No description provided.