markdown-codec 11.1.10 → 11.1.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.
@@ -89,19 +89,25 @@ const HTML_BLOCK_END_PATTERNS = [
89
89
  />/,
90
90
  /\]\]>/
91
91
  ];
92
+ const HTML_BLOCK_RAW_TEXT = 1;
93
+ const HTML_BLOCK_COMMENT = 2;
94
+ const HTML_BLOCK_PROCESSING_INSTRUCTION = 3;
95
+ const HTML_BLOCK_DECLARATION = 4;
96
+ const HTML_BLOCK_CDATA = 5;
97
+ const HTML_BLOCK_KNOWN_TAG = 6;
98
+ const HTML_BLOCK_ANY_COMPLETE_TAG = 7;
92
99
  const HTML_BLOCK_TYPES = [
93
- 1,
94
- 2,
95
- 3,
96
- 4,
97
- 5,
98
- 6,
99
- 7
100
+ HTML_BLOCK_RAW_TEXT,
101
+ HTML_BLOCK_COMMENT,
102
+ HTML_BLOCK_PROCESSING_INSTRUCTION,
103
+ HTML_BLOCK_DECLARATION,
104
+ HTML_BLOCK_CDATA,
105
+ HTML_BLOCK_KNOWN_TAG,
106
+ HTML_BLOCK_ANY_COMPLETE_TAG
100
107
  ];
101
- const LAST_HTML_BLOCK_TYPE = 7;
102
108
  function matchHtmlBlockStart(line, interruptsParagraph) {
103
109
  for (const type of HTML_BLOCK_TYPES) {
104
- if (type === LAST_HTML_BLOCK_TYPE && interruptsParagraph) continue;
110
+ if (type === HTML_BLOCK_ANY_COMPLETE_TAG && interruptsParagraph) continue;
105
111
  if (HTML_BLOCK_START_PATTERNS[type]?.test(line) === true) return type;
106
112
  }
107
113
  }
package/dist/html/html.js CHANGED
@@ -88,19 +88,25 @@ const HTML_BLOCK_END_PATTERNS = [
88
88
  />/,
89
89
  /\]\]>/
90
90
  ];
91
+ const HTML_BLOCK_RAW_TEXT = 1;
92
+ const HTML_BLOCK_COMMENT = 2;
93
+ const HTML_BLOCK_PROCESSING_INSTRUCTION = 3;
94
+ const HTML_BLOCK_DECLARATION = 4;
95
+ const HTML_BLOCK_CDATA = 5;
96
+ const HTML_BLOCK_KNOWN_TAG = 6;
97
+ const HTML_BLOCK_ANY_COMPLETE_TAG = 7;
91
98
  const HTML_BLOCK_TYPES = [
92
- 1,
93
- 2,
94
- 3,
95
- 4,
96
- 5,
97
- 6,
98
- 7
99
+ HTML_BLOCK_RAW_TEXT,
100
+ HTML_BLOCK_COMMENT,
101
+ HTML_BLOCK_PROCESSING_INSTRUCTION,
102
+ HTML_BLOCK_DECLARATION,
103
+ HTML_BLOCK_CDATA,
104
+ HTML_BLOCK_KNOWN_TAG,
105
+ HTML_BLOCK_ANY_COMPLETE_TAG
99
106
  ];
100
- const LAST_HTML_BLOCK_TYPE = 7;
101
107
  function matchHtmlBlockStart(line, interruptsParagraph) {
102
108
  for (const type of HTML_BLOCK_TYPES) {
103
- if (type === LAST_HTML_BLOCK_TYPE && interruptsParagraph) continue;
109
+ if (type === HTML_BLOCK_ANY_COMPLETE_TAG && interruptsParagraph) continue;
104
110
  if (HTML_BLOCK_START_PATTERNS[type]?.test(line) === true) return type;
105
111
  }
106
112
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "markdown-codec",
3
- "version": "11.1.10",
3
+ "version": "11.1.12",
4
4
  "description": "Hand-written CommonMark+GFM <-> DocumentTree codec, built on document-schema.js",
5
5
  "type": "module",
6
6
  "repository": {