|
299 | 299 | * Configuration (optional). |
300 | 300 | * @property {'*' | '+' | '-' | null | undefined} [bullet='*'] |
301 | 301 | * Marker to use for bullets of items in unordered lists (default: `'*'`). |
302 | | - * @property {'*' | '+' | '-' | null | undefined} [bulletOther] |
303 | | - * Marker to use in certain cases where the primary bullet doesn’t work |
304 | | - * (default: depends). |
305 | 302 | * |
306 | 303 | * There are three cases where the primary bullet cannot be used: |
307 | 304 | * |
308 | | - * * When three list items are on their own, the last one is empty, and |
309 | | - * `bullet` is also a valid `rule`: `* - +`. |
310 | | - * This would turn into a thematic break if serialized with three primary |
311 | | - * bullets. |
312 | | - * As this is an edge case unlikely to appear in normal markdown, the |
313 | | - * last list item will be given a different bullet. |
314 | | - * * When a thematic break is the first child of one of the list items, and |
315 | | - * `bullet` is the same character as `rule`: `- ***`. |
316 | | - * This would turn into a single thematic break if serialized with |
317 | | - * primary bullets. |
318 | | - * As this is an edge case unlikely to appear in normal markdown this |
319 | | - * markup is always fixed, even if `bulletOther` is not passed |
320 | | - * * When two unordered lists appear next to each other: `* a\n- b`. |
321 | | - * CommonMark sees different bullets as different lists, but several |
322 | | - * markdown parsers parse it as one list. |
323 | | - * To solve for both, we instead inject an empty comment between the two |
324 | | - * lists: `* a\n<!---->\n* b`, but if `bulletOther` is given explicitly, |
325 | | - * it will be used instead |
| 305 | + * * when three or more list items are on their own, the last one is empty, |
| 306 | + * and `bullet` is also a valid `rule`: `* - +`; this would turn into a |
| 307 | + * thematic break if serialized with three primary bullets; `bulletOther` |
| 308 | + * is used for the last item |
| 309 | + * * when a thematic break is the first child of a list item and `bullet` is |
| 310 | + * the same character as `rule`: `- ***`; this would turn into a single |
| 311 | + * thematic break if serialized with primary bullets; `bulletOther` is used |
| 312 | + * for the item |
| 313 | + * * when two unordered lists appear next to each other: `* a\n- b`; |
| 314 | + * `bulletOther` is used for such lists |
| 315 | + * @property {'*' | '+' | '-' | null | undefined} [bulletOther] |
| 316 | + * Marker to use in certain cases where the primary bullet doesn’t work |
| 317 | + * (default: `'-'` when `bullet` is `'*'`, `'*'` otherwise). |
| 318 | + * |
| 319 | + * Cannot be equal to `bullet`. |
326 | 320 | * @property {'.' | ')' | null | undefined} [bulletOrdered='.'] |
327 | 321 | * Marker to use for bullets of items in ordered lists (default: `'.'`). |
328 | | - * @property {'.' | ')' | null | undefined} [bulletOrderedOther] |
329 | | - * Marker to use in certain cases where the primary bullet for ordered items |
330 | | - * doesn’t work (default: none). |
331 | | - * |
332 | | - * There is one case where the primary bullet for ordered items cannot be used: |
333 | | - * |
334 | | - * * When two ordered lists appear next to each other: `1. a\n2) b`. |
335 | | - * CommonMark added support for `)` as a marker, but other markdown |
336 | | - * parsers do not support it. |
337 | | - * To solve for both, we instead inject an empty comment between the two |
338 | | - * lists: `1. a\n<!---->\n1. b`, but if `bulletOrderedOther` is given |
339 | | - * explicitly, it will be used instead |
| 322 | + * |
| 323 | + * There is one case where the primary bullet for ordered items cannot be |
| 324 | + * used: |
| 325 | + * |
| 326 | + * * when two ordered lists appear next to each other: `1. a\n2) b`; to |
| 327 | + * solve |
| 328 | + * that, `'.'` will be used when `bulletOrdered` is `')'`, and `'.'` |
| 329 | + * otherwise |
340 | 330 | * @property {boolean | null | undefined} [closeAtx=false] |
341 | 331 | * Whether to add the same number of number signs (`#`) at the end of an ATX |
342 | 332 | * heading as the opening sequence (default: `false`). |
|
0 commit comments