@mdream/js 1.2.1 → 1.2.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.
package/dist/_chunks/parse.mjs
CHANGED
|
@@ -622,6 +622,7 @@ function buildTagOverrideHandlers(overrides) {
|
|
|
622
622
|
if (override.enter !== void 0) {
|
|
623
623
|
const enterStr = override.enter;
|
|
624
624
|
handler.enter = () => enterStr;
|
|
625
|
+
handler.literalEnter = true;
|
|
625
626
|
}
|
|
626
627
|
if (override.exit !== void 0) {
|
|
627
628
|
const exitStr = override.exit;
|
|
@@ -197,7 +197,7 @@ function createMarkdownProcessor(options = {}, resolvedPlugins = [], tagOverride
|
|
|
197
197
|
state.lastTextNode = void 0;
|
|
198
198
|
}
|
|
199
199
|
}
|
|
200
|
-
if (output[0]?.[0] && eventType === 0 && lastChar && needsSpacing(lastChar, output[0][0], state)) {
|
|
200
|
+
if (output[0]?.[0] && eventType === 0 && !node.tagHandler?.literalEnter && lastChar && needsSpacing(lastChar, output[0][0], state)) {
|
|
201
201
|
state.buffer.push(" ");
|
|
202
202
|
state.lastContentCache = " ";
|
|
203
203
|
}
|
package/dist/_chunks/types.d.mts
CHANGED
|
@@ -289,6 +289,12 @@ interface TagHandler {
|
|
|
289
289
|
isInline?: boolean;
|
|
290
290
|
spacing?: readonly [number, number];
|
|
291
291
|
excludesTextNodes?: boolean;
|
|
292
|
+
/**
|
|
293
|
+
* When true, the `enter` string is emitted verbatim without synthesizing a
|
|
294
|
+
* separating space before it. Set for user-supplied tagOverride enter
|
|
295
|
+
* strings so markers like `^`/`~` attach to adjacent content (issue #93).
|
|
296
|
+
*/
|
|
297
|
+
literalEnter?: boolean;
|
|
292
298
|
}
|
|
293
299
|
interface TailwindContext {
|
|
294
300
|
hidden?: boolean;
|
package/package.json
CHANGED