@lalalic/markcut 3.2.4 → 3.2.5

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.
@@ -0,0 +1,16 @@
1
+
2
+ ## HTML comments: ignored metadata
3
+
4
+ Standard Markdown HTML comments are intentionally ignored by Markcut's descriptive parser and never enter the descriptive tree or rendered output:
5
+
6
+ ```md
7
+ <!-- arbitrary metadata -->
8
+ ```
9
+
10
+ This makes comments suitable for **out-of-band metadata owned by another tool**, for example:
11
+
12
+ ```md
13
+ <!-- execution {"id":"profiles-demo","type":"demo","scene_id":"profiles","output":"assets/profiles-demo.mp4"} -->
14
+ ```
15
+
16
+ Markcut does **not** parse, validate, or interpret the comment contents. It only guarantees that HTML comment nodes are ignored. A separate tool may read its own comment convention directly from the Markdown source.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lalalic/markcut",
3
- "version": "3.2.4",
3
+ "version": "3.2.5",
4
4
  "description": "Markdown-to-video engine. Describe scenes in markdown, get a rendered video.",
5
5
  "bin": {
6
6
  "markcut": "bin/markcut"
@@ -864,3 +864,41 @@ layout:parallel
864
864
  });
865
865
  });
866
866
  });
867
+
868
+ // HTML comments are an intentional out-of-band metadata channel. remark-parse
869
+ // emits them as `html` nodes; Markcut ignores those nodes completely.
870
+ describe("HTML comments", () => {
871
+ it("ignores generic HTML comments", () => {
872
+ const doc = `# video
873
+ <!-- arbitrary metadata -->
874
+ ## Scene
875
+ - image src:a.jpg duration:1`;
876
+ const parsed = parseMarkdownDescriptive(doc);
877
+ expect(parsed.children).toHaveLength(1);
878
+ const scene = parsed.children[0] as any;
879
+ expect(scene.name).toBe("Scene");
880
+ expect(scene.children).toHaveLength(1);
881
+ expect(scene.children[0].type).toBe("image");
882
+ });
883
+
884
+ it("ignores execution metadata comments between scene metadata and media", () => {
885
+ const doc = `# video
886
+ width:1920 height:1080 fps:30 layout:series
887
+
888
+ ## profiles
889
+ title:"Reveal profiles" instruction:"Each child has a distinct profile"
890
+ <!-- execution {"id":"profiles-demo","type":"demo","scene_id":"profiles","output":"assets/profiles-demo.mp4"} -->
891
+ - video src:"assets/profiles-demo.mp4" duration:6`;
892
+ const parsed = parseMarkdownDescriptive(doc);
893
+ const scene = parsed.children[0] as any;
894
+ expect(scene.name).toBe("profiles");
895
+ expect(scene.title).toBe("Reveal profiles");
896
+ expect(scene.instruction).toBe("Each child has a distinct profile");
897
+ expect(scene.children).toHaveLength(1);
898
+ expect(scene.children[0]).toMatchObject({
899
+ type: "video",
900
+ src: "assets/profiles-demo.mp4",
901
+ duration: 6,
902
+ });
903
+ });
904
+ });