@hawkeyexl/manni 2.3.4 → 2.3.6

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/README.md CHANGED
@@ -98,7 +98,7 @@ actually reads rather than hand-written:
98
98
  ```yaml
99
99
  repos:
100
100
  - repo: https://github.com/hawkeyexl/manni
101
- rev: v2.3.4
101
+ rev: v2.3.6
102
102
  hooks:
103
103
  - id: manni-meta
104
104
  ```
@@ -61,7 +61,7 @@ import {
61
61
  supportedExtensions,
62
62
  terminalConfirm,
63
63
  toJsonText
64
- } from "./chunk-LHYFB75E.js";
64
+ } from "./chunk-UUXTFBWD.js";
65
65
 
66
66
  // src/meta/cli.ts
67
67
  import { existsSync } from "node:fs";
@@ -1517,4 +1517,4 @@ export {
1517
1517
  reportConfig,
1518
1518
  buildProgram
1519
1519
  };
1520
- //# sourceMappingURL=chunk-KUZJ23HJ.js.map
1520
+ //# sourceMappingURL=chunk-3TVBXXJD.js.map
@@ -32,6 +32,7 @@ import {
32
32
  findWindows,
33
33
  generateEncryptionKey,
34
34
  gitignoreOptions,
35
+ hasFrontmatterFence,
35
36
  hashLines,
36
37
  hashRange,
37
38
  isEncryptedValue,
@@ -69,7 +70,7 @@ import {
69
70
  withValueAt,
70
71
  writeEncryptionKey,
71
72
  writeFileAtomic
72
- } from "./chunk-LHYFB75E.js";
73
+ } from "./chunk-UUXTFBWD.js";
73
74
 
74
75
  // src/meta/core/reencrypt.ts
75
76
  import { extname } from "node:path";
@@ -1345,6 +1346,7 @@ var citations_default = {
1345
1346
  // src/cite/core/page.ts
1346
1347
  var MAX_MARKERS_PER_PAGE = 500;
1347
1348
  var ELEMENT_BACKED = /* @__PURE__ */ new Set(["html", "xml"]);
1349
+ var FENCE_ONLY = /* @__PURE__ */ new Set(["markdown", "mdx"]);
1348
1350
  var MARKER_JSON = "A marker names an entry by id. Write the entry in frontmatter or the sidecar.";
1349
1351
  function ownedMessage(owner) {
1350
1352
  return `"citations" is owned by manifest ${owner.file} (collection ${owner.collection}); remove it from the document`;
@@ -1452,6 +1454,11 @@ function bodyLineOf(content, bodyOffset) {
1452
1454
  function readPage(file, content, opts) {
1453
1455
  const extractor = pickExtractor(file, opts?.format);
1454
1456
  const format = extractor.name;
1457
+ if (FENCE_ONLY.has(format) && hasFrontmatterFence(content) && locateFrontmatter(content) === null) {
1458
+ throw new CiteError(
1459
+ `${file}: Unterminated front matter fence: the opening fence has no matching close, so the page's citations cannot be read. Add a closing fence.`
1460
+ );
1461
+ }
1455
1462
  const extracted = extractor.extract(content, file);
1456
1463
  const data = extracted.data;
1457
1464
  const bodyOffset = ELEMENT_BACKED.has(format) ? 0 : locateFrontmatter(content)?.closeEnd ?? 0;
@@ -4258,4 +4265,4 @@ export {
4258
4265
  runKeyRotate,
4259
4266
  runKeySet
4260
4267
  };
4261
- //# sourceMappingURL=chunk-THU5EEXC.js.map
4268
+ //# sourceMappingURL=chunk-CGE2SVW7.js.map