@godxjp/markdown 31.28.2 → 31.28.4

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
@@ -55,7 +55,7 @@ so a narrow table scrolls instead of squashing them.
55
55
 
56
56
  ## Grammar v1 and the codec (`@godxjp/markdown/codec`)
57
57
 
58
- The renderer (`RENDERER_VERSION` 4), the codec and `@godxjp/block-editor` read one syntax, from one
58
+ The renderer (`RENDERER_VERSION` 5), the codec and `@godxjp/block-editor` read one syntax, from one
59
59
  set of parsers, so a body means the same thing in the editor, on a server and on the page.
60
60
 
61
61
  ### Syntax
package/dist/index.d.ts CHANGED
@@ -77,7 +77,7 @@ type PluggableList = NonNullable<Options$1["remarkPlugins"]>;
77
77
  * differently — a schema change, a new default plugin — not on every release.
78
78
  */
79
79
  declare const MARKDOWN_FORMAT = "md";
80
- declare const RENDERER_VERSION = 4;
80
+ declare const RENDERER_VERSION = 5;
81
81
  type MarkdownProps = {
82
82
  /** The Markdown source. */
83
83
  children: string;
package/dist/index.js CHANGED
@@ -432,7 +432,7 @@ function directive2(node, nested) {
432
432
  // src/markdown.tsx
433
433
  import { jsx as jsx3 } from "react/jsx-runtime";
434
434
  var MARKDOWN_FORMAT = "md";
435
- var RENDERER_VERSION = 4;
435
+ var RENDERER_VERSION = 5;
436
436
  var URL_ATTRIBUTES = {
437
437
  a: "href",
438
438
  img: "src",
@@ -683,6 +683,14 @@ var MARKDOWN_FIXTURES = [
683
683
  name: "wikilinks, embeds and times stay text",
684
684
  markdown: "See [[Page#Intro|intro]] at 10:30.\n\n![[Diagram]]",
685
685
  html: "<p>See [[Page#Intro|intro]] at 10:30.</p>\n<p>![[Diagram]]</p>"
686
+ },
687
+ {
688
+ // Renderer v5 (gh#1163): YAML front matter is metadata, not body. Before v5 it rendered as an
689
+ // <hr> plus a setext <h2> holding the YAML text.
690
+ name: "YAML front matter renders nothing",
691
+ markdown: "---\ntitle: Spec\ntags: [a]\n---\n\n# Heading\n\nBody",
692
+ html: '<h1 id="heading">Heading</h1>\n<p>Body</p>',
693
+ forbidden: ["title: Spec", "<hr"]
686
694
  }
687
695
  ];
688
696
  export {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@godxjp/markdown",
3
- "version": "31.28.2",
3
+ "version": "31.28.4",
4
4
  "description": "The one Markdown renderer for GoDX apps: GFM + heading anchors, one sanitiser schema, a shared fixture corpus, and Mermaid drawn only after its SVG passes a fail-closed gate.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",