@dogsbay/format-asciidoc 0.2.0-beta.183 → 0.2.0-beta.184

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/cli.js CHANGED
@@ -285,6 +285,8 @@ async function importAsciidoc(source, opts) {
285
285
  ? opts.falseAttributes
286
286
  : [],
287
287
  clampRowspans: opts.clampRowspans === true,
288
+ // `converterTypography: "source"` from migrate-asciidoc; a build renders as Asciidoctor does
289
+ typography: opts.converterTypography === "source" ? "source" : "asciidoctor",
288
290
  });
289
291
  const headings = extractHeadings(tree);
290
292
  const h1 = headings.find((h) => h.depth === 1);
package/dist/parse.d.ts CHANGED
@@ -99,6 +99,12 @@ export interface ParseAsciidocOptions {
99
99
  falseAttributes?: string[];
100
100
  /** Clamp over-declared rowspans to fitting rows (issue #031). Opt-in. */
101
101
  clampRowspans?: boolean;
102
+ /**
103
+ * Asciidoctor's implicit replacements in the Markdown (plans/source-typography.md). `"asciidoctor"`
104
+ * (default) for rendering an AsciiDoc source as Asciidoctor would; `"source"` for a migration, which
105
+ * keeps the typed characters and sets `markdown.typography` instead.
106
+ */
107
+ typography?: "source" | "asciidoctor";
102
108
  /**
103
109
  * Docroot-relative slug of the source page (e.g. `"architecture/admission-plug-ins"`).
104
110
  * Threaded into adoc2md-modular so cross-doc xref hrefs resolve to
package/dist/parse.js CHANGED
@@ -29,6 +29,7 @@ export async function parseAsciidocToTree(md, src, opts = {}) {
29
29
  blockRoles: opts.blockRoles ?? false,
30
30
  falseAttributes: opts.falseAttributes ?? [],
31
31
  clampRowspans: opts.clampRowspans ?? false,
32
+ typography: opts.typography ?? "asciidoctor",
32
33
  // Tag-filtered includes splice file content at CONVERT time, below
33
34
  // the Minja layer — the engine enforces the same containment there
34
35
  // (#027 review finding F1).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dogsbay/format-asciidoc",
3
- "version": "0.2.0-beta.183",
3
+ "version": "0.2.0-beta.184",
4
4
  "description": "AsciiDoc format plugin for Dogsbay — imports .adoc sources into TreeNode[] via the adoc2md-modular engine + Minja resolution + markdown-it walker.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -25,10 +25,10 @@
25
25
  "dependencies": {
26
26
  "markdown-it": "^14.3.0",
27
27
  "yaml": "^2.9.0",
28
- "@dogsbay/adoc2md-modular": "0.2.0-beta.183",
29
- "@dogsbay/format-dogsbay-md": "0.2.0-beta.183",
30
- "@dogsbay/minja": "0.2.0-beta.183",
31
- "@dogsbay/types": "0.2.0-beta.183"
28
+ "@dogsbay/adoc2md-modular": "0.2.0-beta.184",
29
+ "@dogsbay/format-dogsbay-md": "0.2.0-beta.184",
30
+ "@dogsbay/minja": "0.2.0-beta.184",
31
+ "@dogsbay/types": "0.2.0-beta.184"
32
32
  },
33
33
  "devDependencies": {
34
34
  "@types/markdown-it": "^14.1.2",