@readme/markdown 14.3.0 → 14.4.0

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.
@@ -1,3 +1,7 @@
1
+ /**
2
+ * Skip certain regions / parts of the content that htmlparser2 should not handle
3
+ */
4
+ export declare const maskNonTagRegions: (html: string) => string;
1
5
  interface TagEvent {
2
6
  end: number;
3
7
  name: string;
@@ -1,5 +1,6 @@
1
1
  import type { Node } from 'mdast';
2
2
  export interface Insert {
3
+ consumes?: number;
3
4
  offset: number;
4
5
  text: string;
5
6
  }
@@ -8,14 +8,15 @@
8
8
  *
9
9
  * @link https://spec.commonmark.org/0.29/#html-blocks
10
10
  *
11
- * This preprocessor inserts a blank line after standalone HTML lines when the
12
- * next line is non-blank and not an HTML construct (because they still might be part of the HTML flow),
13
- * ensuring micromark's HTML flow tokenizer terminates and subsequent content is parsed independently.
11
+ * This preprocessor inserts a blank line after standalone HTML lines when the next
12
+ * line is non-blank and not an HTML construct, ensuring micromark's HTML flow
13
+ * tokenizer terminates and subsequent content is parsed independently.
14
14
  *
15
15
  * Conditions:
16
- * 1. Only targets non-indented lines with lowercase tag names. Uppercase tags
17
- * (e.g., `<Table>`, `<MyComponent>`) are JSX custom components and don't
18
- * trigger CommonMark HTML blocks, so they are left untouched.
19
- * 2. Lines inside protected blocks (e.g., code blocks) should be left untouched.
16
+ * 1. Only non-indented lines with lowercase tag names are considered. Uppercase tags
17
+ * (e.g. `<Table>`, `<MyComponent>`) are JSX custom components and don't trigger
18
+ * CommonMark HTML blocks.
19
+ * 2. Lines inside protected blocks (e.g. fenced code) are left untouched.
20
+ * 3. Lines with an unclosed RAW_CONTENT_TAGS opener are exempted.
20
21
  */
21
22
  export declare function terminateHtmlFlowBlocks(content: string): string;
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@readme/markdown",
3
3
  "description": "ReadMe's React-based Markdown parser",
4
4
  "author": "Rafe Goldberg <rafe@readme.io>",
5
- "version": "14.3.0",
5
+ "version": "14.4.0",
6
6
  "main": "dist/main.node.js",
7
7
  "types": "dist/index.d.ts",
8
8
  "browser": "dist/main.js",
@@ -177,7 +177,7 @@
177
177
  },
178
178
  {
179
179
  "path": "dist/main.node.js",
180
- "maxSize": "945KB"
180
+ "maxSize": "947KB"
181
181
  }
182
182
  ]
183
183
  },
package/types.d.ts CHANGED
@@ -136,6 +136,7 @@ export interface ImageBlockAttrs {
136
136
  caption?: string;
137
137
  children?: RootContent[];
138
138
  className?: string;
139
+ framed?: boolean;
139
140
  height?: string;
140
141
  lazy?: boolean;
141
142
  sizing?: string;