@mdream/js
Advanced tools
@@ -625,2 +625,3 @@ import { a as NO_SPACING, c as TABLE_ROW_SPACING, g as TagIdMap, i as LIST_ITEM_SPACING, t as BLOCKQUOTE_SPACING } from "./const.mjs"; | ||
| handler.enter = () => enterStr; | ||
| handler.literalEnter = true; | ||
| } | ||
@@ -627,0 +628,0 @@ if (override.exit !== void 0) { |
@@ -200,3 +200,3 @@ import { a as NO_SPACING, n as DEFAULT_BLOCK_SPACING } from "./const.mjs"; | ||
| } | ||
| if (output[0]?.[0] && eventType === 0 && lastChar && needsSpacing(lastChar, output[0][0], state)) { | ||
| if (output[0]?.[0] && eventType === 0 && !node.tagHandler?.literalEnter && lastChar && needsSpacing(lastChar, output[0][0], state)) { | ||
| state.buffer.push(" "); | ||
@@ -203,0 +203,0 @@ state.lastContentCache = " "; |
@@ -292,2 +292,8 @@ declare const TAG_H1 = 7; | ||
| excludesTextNodes?: boolean; | ||
| /** | ||
| * When true, the `enter` string is emitted verbatim without synthesizing a | ||
| * separating space before it. Set for user-supplied tagOverride enter | ||
| * strings so markers like `^`/`~` attach to adjacent content (issue #93). | ||
| */ | ||
| literalEnter?: boolean; | ||
| } | ||
@@ -294,0 +300,0 @@ interface TailwindContext { |
+1
-1
| { | ||
| "name": "@mdream/js", | ||
| "type": "module", | ||
| "version": "1.2.1", | ||
| "version": "1.2.2", | ||
| "description": "JavaScript HTML-to-Markdown engine for mdream. Escape hatch for hooks and edge runtimes.", | ||
@@ -6,0 +6,0 @@ "author": { |
161044
0.21%3562
0.03%