drafter-mcp 0.24.2 → 0.25.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.
- package/drafter-mcp.js +6 -6
- package/package.json +1 -1
package/drafter-mcp.js
CHANGED
|
@@ -23233,7 +23233,7 @@ function toError(value) {
|
|
|
23233
23233
|
return value instanceof Error ? value : new Error(String(value));
|
|
23234
23234
|
}
|
|
23235
23235
|
// package.json
|
|
23236
|
-
var version = "0.
|
|
23236
|
+
var version = "0.25.0";
|
|
23237
23237
|
// ../fountain/src/inline.ts
|
|
23238
23238
|
const MARKERS$1 = /[*_\\]/;
|
|
23239
23239
|
const isSpace$10 = (code) => code === void 0 || /\s/.test(String.fromCharCode(code));
|
|
@@ -23395,11 +23395,11 @@ function jsonOf(meta) {
|
|
|
23395
23395
|
}).replaceAll("/", "\\/");
|
|
23396
23396
|
}
|
|
23397
23397
|
/**
|
|
23398
|
-
*
|
|
23399
|
-
*
|
|
23400
|
-
*
|
|
23398
|
+
* The `/* drafter … *\/` boneyard that `parse` reads as `doc.meta`, the last block and alone in it,
|
|
23399
|
+
* or null when there is none. Only the boneyard itself, so the blank lines and indent around it
|
|
23400
|
+
* stay as they were.
|
|
23401
23401
|
*/
|
|
23402
|
-
function
|
|
23402
|
+
function metadataSpan(doc) {
|
|
23403
23403
|
if (doc.meta === null) return null;
|
|
23404
23404
|
const last = doc.blocks[doc.blocks.length - 1];
|
|
23405
23405
|
if (last?.kind !== "boneyard") return null;
|
|
@@ -23428,7 +23428,7 @@ function setMeta(doc, meta) {
|
|
|
23428
23428
|
const json = jsonOf(meta);
|
|
23429
23429
|
const nl = lineBreakOf(source);
|
|
23430
23430
|
const block = `${OPENER$2}${nl}${json}${nl}*/`;
|
|
23431
|
-
const existing =
|
|
23431
|
+
const existing = metadataSpan(doc);
|
|
23432
23432
|
if (existing) {
|
|
23433
23433
|
if (jsonOf(doc.meta) === json) return [];
|
|
23434
23434
|
return [{
|
package/package.json
CHANGED