allow empty string as firstDelim #87

Merged
konstantinruge merged 1 commit from master into master 2022-10-21 14:06:04 +02:00
konstantinruge commented 2022-10-21 13:59:30 +02:00 (Migrated from github.com)

Hey!

Thanks for all the great work you put into Prosemirror!

We recently used prosemirror-markdown to transform our JSON content to Markdown. While doing that, we had the case that we wanted to render a list in which all items except the first had a delimiter.

This wasn't possible since passing in an empty string as firstDelim was considered falsy in firstDelim || delim.

I would like to propose changing it to firstDelim != null ? firstDelim : delim so that delim really only gets used if firstDelim is null or undefned.

Hey! Thanks for all the great work you put into Prosemirror! We recently used prosemirror-markdown to transform our JSON content to Markdown. While doing that, we had the case that we wanted to render a list in which all items except the first had a delimiter. This wasn't possible since passing in an empty string as `firstDelim` was considered falsy in `firstDelim || delim`. I would like to propose changing it to `firstDelim != null ? firstDelim : delim` so that delim really only gets used if firstDelim is null or undefned.
marijnh commented 2022-10-21 14:06:15 +02:00 (Migrated from github.com)

Looks reasonable, thanks.

Looks reasonable, thanks.
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
prosemirror/prosemirror-markdown!87
No description provided.