@marp-team/marp-core 3.7.0 → 3.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/lib/marp.js +2 -2
- package/package.json +26 -27
- package/types/src/highlightjs.d.ts +2 -0
- package/types/src/marp.d.ts +3 -0
package/README.md
CHANGED
|
@@ -336,7 +336,7 @@ You can control details of behavior by passing `object`.
|
|
|
336
336
|
- **`slugifier`**: _`function`_ - Set the custom slugifier function.
|
|
337
337
|
- **`postSlugify`**: _`function`_ - Set the post-process function after generated a slug. The function takes 2 arguments, the string of generated slug and the index of the same slug, and must return a string for assigning to `id` attribute of the heading.
|
|
338
338
|
|
|
339
|
-
By default, Marp Core applies the post-process to avoid assigning duplicated `id`s in the document: ``
|
|
339
|
+
By default, Marp Core applies the post-process to avoid assigning duplicated `id`s in the document: ``(slug, index) => (index > 0 ? `${slug}-${index}` : slug)``
|
|
340
340
|
|
|
341
341
|
Assigning the custom post-process function is also helpful to append the custom prefix and suffix to the generated slug: `` (slug, i) => `prefix:${slug}:${i}` ``
|
|
342
342
|
|