@leadertechie/md2html 0.1.0-alpha.10 → 0.1.0-alpha.11
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 +5 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -70,16 +70,18 @@ const pipeline = new MarkdownPipeline({
|
|
|
70
70
|
|
|
71
71
|
| Option | Type | Default | Description |
|
|
72
72
|
|--------|------|---------|-------------|
|
|
73
|
-
| `classPrefix` | string | `''` | Prefix for CSS classes on elements
|
|
73
|
+
| `classPrefix` | string | `''` | Prefix for CSS classes on elements |
|
|
74
74
|
| `customCSS` | string | `''` | Custom CSS string to inject (use `pipeline.getCustomCSS()` to retrieve) |
|
|
75
75
|
| `addHeadingIds` | boolean | `false` | Add ID attributes to headings based on their content for anchor links |
|
|
76
76
|
|
|
77
77
|
When `classPrefix` or `addHeadingIds` is set, CSS classes will be added to elements:
|
|
78
|
-
-
|
|
78
|
+
- Headings get level-specific classes: `md-h1`, `md-h2`, `md-h3`, etc.
|
|
79
|
+
- Other elements: `paragraph`, `list`, `list-item`, `image`, `code`, `container`, `blockquote`
|
|
79
80
|
|
|
80
81
|
Example output with `classPrefix: 'md-'` and `addHeadingIds: true`:
|
|
81
82
|
```html
|
|
82
|
-
<h1 id="hello-world" class="md-
|
|
83
|
+
<h1 id="hello-world" class="md-h1">Hello World</h1>
|
|
84
|
+
<h2 id="subheading" class="md-h2">Subheading</h2>
|
|
83
85
|
<p class="md-paragraph">This is a paragraph.</p>
|
|
84
86
|
<ul class="md-list">
|
|
85
87
|
<li class="md-list-item">Item 1</li>
|
package/package.json
CHANGED