@md-plugins/md-plugin-headers 0.1.0-alpha.11 → 0.1.0-alpha.12

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.
Files changed (2) hide show
  1. package/dist/index.mjs +1 -7
  2. package/package.json +2 -2
package/dist/index.mjs CHANGED
@@ -3,7 +3,6 @@ import { slugify } from '@md-plugins/shared';
3
3
  const titleRE = /<\/?[^>]+(>|$)/g;
4
4
  const apiRE = /^<MarkdownApi /;
5
5
  const apiNameRE = /(?:file|name)="([^"]+)"/;
6
- const installationRE = /^<MarkdownInstallation(?:\s+title="([^"]*)")?\s*/;
7
6
  const exampleRE = /^<MarkdownExample(?:\s+title="([^"]*)")?\s*/;
8
7
  function parseContent(str, slugify$1 = slugify, format = (_str) => _str) {
9
8
  const title = String(str).replace(titleRE, "").trim();
@@ -57,12 +56,7 @@ const headersPlugin = (md, {
57
56
  env.toc.push({ id: slugify$1(title), title, deep: true });
58
57
  }
59
58
  }
60
- let match = token.content.match(installationRE);
61
- if (match !== null) {
62
- const title = match[1] ?? "Installation";
63
- env.toc.push({ id: slugify$1(title), title, deep: true });
64
- }
65
- match = token.content.match(exampleRE);
59
+ const match = token.content.match(exampleRE);
66
60
  if (match !== null) {
67
61
  const title = match[1] ?? "Example";
68
62
  env.toc.push({ id: slugify$1(title), title, deep: true });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@md-plugins/md-plugin-headers",
3
- "version": "0.1.0-alpha.11",
3
+ "version": "0.1.0-alpha.12",
4
4
  "description": "A markdown-it plugin for handling headers (H1-H6).",
5
5
  "keywords": [
6
6
  "markdown-it",
@@ -34,7 +34,7 @@
34
34
  ],
35
35
  "dependencies": {
36
36
  "markdown-it": "^14.1.0",
37
- "@md-plugins/shared": "0.1.0-alpha.11"
37
+ "@md-plugins/shared": "0.1.0-alpha.12"
38
38
  },
39
39
  "devDependencies": {
40
40
  "@types/markdown-it": "^14.1.2"