comark 0.1.1 → 0.1.2

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.
@@ -13,7 +13,7 @@ export interface HeadingsOptions {
13
13
  descriptionTag?: string;
14
14
  /**
15
15
  * Whether to remove the extracted nodes from the tree.
16
- * @default true
16
+ * @default false
17
17
  */
18
18
  remove?: boolean;
19
19
  }
@@ -50,7 +50,7 @@ function flattenNodeText(node) {
50
50
  * ```
51
51
  */
52
52
  export default function headings(options = {}) {
53
- const { titleTag = 'h1', descriptionTag = 'p', remove = true } = options;
53
+ const { titleTag = 'h1', descriptionTag = 'p', remove = false } = options;
54
54
  return {
55
55
  name: 'headings',
56
56
  post(state) {
@@ -1,5 +1,5 @@
1
1
  import type { ComarkPlugin } from 'comark';
2
- import type { PropsValidationOptions } from '../internal/props-validation';
2
+ import type { PropsValidationOptions } from '../internal/props-validation.ts';
3
3
  interface SecurityOptions extends PropsValidationOptions {
4
4
  /**
5
5
  * Tags to remove entirely from the output tree.
@@ -1,5 +1,5 @@
1
1
  import { visit } from 'comark/utils';
2
- import { validateProps } from '../internal/props-validation';
2
+ import { validateProps } from "../internal/props-validation.js";
3
3
  export default function security(options = {}) {
4
4
  const { blockedTags = [], allowedLinkPrefixes, allowedImagePrefixes, allowedProtocols, defaultOrigin, allowDataImages, } = options;
5
5
  const dropSet = new Set(blockedTags.map(t => t.toLowerCase()));
@@ -1,5 +1,5 @@
1
- import { applyAutoUnwrap } from '../internal/parse/auto-unwrap';
2
- import { marmdownItTokensToComarkTree } from '../internal/parse/token-processor';
1
+ import { applyAutoUnwrap } from "../internal/parse/auto-unwrap.js";
2
+ import { marmdownItTokensToComarkTree } from "../internal/parse/token-processor.js";
3
3
  export default function summary(delimiter = '<!-- more -->') {
4
4
  return {
5
5
  name: 'summary',
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "comark",
3
3
  "type": "module",
4
- "version": "0.1.1",
4
+ "version": "0.1.2",
5
5
  "description": "Components in Markdown (Comark) parser with streaming support for Vue, React, Svelte and HTML",
6
6
  "author": "",
7
7
  "license": "MIT",