@readme/markdown 14.4.0 → 14.4.1

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.
@@ -7,12 +7,22 @@ interface TagEvent {
7
7
  name: string;
8
8
  start: number;
9
9
  }
10
+ /**
11
+ * `isSelfClosing` — source ends with `/>`.
12
+ * `isStrayCloser` — source starts with `</`. htmlparser2 follows the HTML5
13
+ * spec and rewrites stray void closers (`</br>`, `</p>`) into `onopentag`
14
+ * events; this flag lets consumers tell that apart from a real opener.
15
+ */
16
+ interface OpenEvent extends TagEvent {
17
+ isSelfClosing: boolean;
18
+ isStrayCloser: boolean;
19
+ }
10
20
  interface CloseEvent extends TagEvent {
11
21
  implicit: boolean;
12
22
  }
13
23
  interface TagWalkHandlers {
14
24
  onClose?: (event: CloseEvent) => void;
15
- onOpen?: (event: TagEvent) => void;
25
+ onOpen?: (event: OpenEvent) => void;
16
26
  }
17
27
  /**
18
28
  * Drive htmlparser2 over `html` (after masking non-tag regions) and emit
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.4.0",
5
+ "version": "14.4.1",
6
6
  "main": "dist/main.node.js",
7
7
  "types": "dist/index.d.ts",
8
8
  "browser": "dist/main.js",