svelte-markdown
Advanced tools
Comparing version 0.1.7 to 0.1.8
{ | ||
"name": "svelte-markdown", | ||
"description": "A markdown renderer for Svelte", | ||
"version": "0.1.7", | ||
"version": "0.1.8", | ||
"main": "dist/sveltemarkdown.js", | ||
@@ -6,0 +6,0 @@ "module": "dist/sveltemarkdown.es.js", |
@@ -119,2 +119,26 @@ # Svelte Markdown | ||
### Optional List Renderers | ||
For fine detail styling of lists, it can be useful to differentiate between ordered and un-ordered lists. | ||
If either key is missing, the default `listitem` will be used. There are two | ||
optional keys in the `renderers` option which can provide this: | ||
- `orderedlistitem` - A list item appearing inside an ordered list | ||
- `unorderedlistitem` A list item appearing inside an un-ordered list | ||
As an example, if we have an `orderedlistitem`: | ||
```sveltehtml | ||
<style> | ||
li::marker{ | ||
color: blue; | ||
} | ||
</style> | ||
<li><slot></slot></li> | ||
``` | ||
Then numbers at the start of ordered list items would be colored blue. Bullets at the start of unordered list items | ||
would remain the default text color. | ||
## Developing | ||
@@ -121,0 +145,0 @@ |
@@ -41,2 +41,4 @@ import marked from 'marked/lib/marked.esm.js' | ||
list: List, | ||
orderedlistitem: null, | ||
unorderedlistitem: null, | ||
listitem: ListItem, | ||
@@ -43,0 +45,0 @@ hr: Hr, |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
14029
89
170