@pretextbook/markdown-style-pretext 0.1.4 → 0.1.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pretextbook/markdown-style-pretext",
3
- "version": "0.1.4",
3
+ "version": "0.1.5",
4
4
  "description": "Editor intelligence (completions + validation) for Markdown-style PreTeXt documents",
5
5
  "author": "Oscar Levin",
6
6
  "license": "MIT",
@@ -34,11 +34,11 @@
34
34
  "test": "vitest run"
35
35
  },
36
36
  "dependencies": {
37
- "@pretextbook/latex-style-pretext": "^0.5.0",
37
+ "@pretextbook/latex-style-pretext": "^0.6.0",
38
38
  "vscode-languageserver-types": "^3.17.5"
39
39
  },
40
40
  "devDependencies": {
41
- "@pretextbook/remark-pretext": "^0.1.0"
41
+ "@pretextbook/remark-pretext": "^0.3.0"
42
42
  },
43
43
  "publishConfig": {
44
44
  "access": "public"
@@ -106,6 +106,11 @@ describe("cross-reference completions", () => {
106
106
  const items = complete(":::theorem{#thm:main}\nHi\n:::\n\nSee [it](#thm|");
107
107
  expect(labels(items)).toContain("thm:main");
108
108
  });
109
+
110
+ it("completes an empty `[](#…` link, and ids on headings", () => {
111
+ const items = complete("## Intro {#sec:intro}\n\nSee [](#sec|");
112
+ expect(labels(items)).toContain("sec:intro");
113
+ });
109
114
  });
110
115
 
111
116
  describe("suppression", () => {
@@ -11,8 +11,8 @@
11
11
  // - LEAF directives (`::name{…}`) are the PreTeXt Plus *include* syntax; the
12
12
  // converter turns any `::name` into `<plus:name/>`, so no leaf name is ever
13
13
  // "unknown". `LEAF_DIRECTIVES` below is only a convenience completion list.
14
- // - TEXT directives (`:name[…]`) have no converter handler yet (they become
15
- // `<TODO>` placeholders), so this package neither completes nor lints them.
14
+ // - TEXT directives (`:name[…]`) have no converter handler yet (they stay
15
+ // text), so this package neither completes nor lints them.
16
16
 
17
17
  import { PLUS_TYPES, PLUS_TYPE_KIND } from "@pretextbook/latex-style-pretext";
18
18
  import type { DirectiveSpec, DirectiveCategory } from "../types";
package/src/types.ts CHANGED
@@ -14,9 +14,9 @@ export type { PretextFlavorLanguage, GetCompletionsParams };
14
14
  * - `container` — `:::name` … `:::` (block), the workhorse (theorem, exercise…)
15
15
  * - `leaf` — `::name{…}` (a self-closing block; the PreTeXt Plus include
16
16
  * syntax, so *any* name is accepted and none is ever "unknown")
17
- * - `text` — `:name[…]{…}` (inline). The converter has no `textDirective`
18
- * handler yet, so these are recognized by the scanner but neither completed
19
- * nor linted (see the note in ./data/directives.ts).
17
+ * - `text` — `:name[…]{…}` (inline). The converter doesn't read these yet
18
+ * and leaves them as text, so they are recognized by the scanner but neither
19
+ * completed nor linted (see the note in ./data/directives.ts).
20
20
  */
21
21
  export type DirectiveKind = "container" | "leaf" | "text";
22
22