@effected/markdown 0.15.0 → 0.15.1

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/Markdown.js CHANGED
@@ -50,12 +50,18 @@ var MarkdownParseOptions = class extends Schema.Class("MarkdownParseOptions")({
50
50
  * failures. A malformed-looking document parses; a nesting bomb fails here
51
51
  * rather than crashing with a `RangeError`.
52
52
  *
53
+ * The `message` renders the diagnostic's position 1-based
54
+ * (`line + 1:character + 1`) for human readers — a CLI printing this string
55
+ * shows the line/column a person counts in their editor. The structured
56
+ * {@link MarkdownDiagnostic} `line`/`character` fields stay 0-based (LSP
57
+ * convention); the offset applies to the rendered message only.
58
+ *
53
59
  * @public
54
60
  */
55
61
  var MarkdownParseError = class extends Schema.TaggedError()("MarkdownParseError", { diagnostic: MarkdownDiagnostic }) {
56
62
  get message() {
57
63
  const { code, line, character, message } = this.diagnostic;
58
- return `Markdown parse failed: ${code} at ${line}:${character} ${message}`;
64
+ return `Markdown parse failed: ${code} at ${line + 1}:${character + 1} ${message}`;
59
65
  }
60
66
  };
61
67
  /**
package/index.d.ts CHANGED
@@ -1054,6 +1054,12 @@ declare const MarkdownParseError_base: Schema.Class<MarkdownParseError, Schema.T
1054
1054
  * failures. A malformed-looking document parses; a nesting bomb fails here
1055
1055
  * rather than crashing with a `RangeError`.
1056
1056
  *
1057
+ * The `message` renders the diagnostic's position 1-based
1058
+ * (`line + 1:character + 1`) for human readers — a CLI printing this string
1059
+ * shows the line/column a person counts in their editor. The structured
1060
+ * {@link MarkdownDiagnostic} `line`/`character` fields stay 0-based (LSP
1061
+ * convention); the offset applies to the rendered message only.
1062
+ *
1057
1063
  * @public
1058
1064
  */
1059
1065
  export declare class MarkdownParseError extends MarkdownParseError_base {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@effected/markdown",
3
- "version": "0.15.0",
3
+ "version": "0.15.1",
4
4
  "private": false,
5
5
  "description": "CommonMark and GFM markdown parse, edit and transform schemas for Effect",
6
6
  "keywords": [
@@ -39,9 +39,9 @@
39
39
  "./package.json": "./package.json"
40
40
  },
41
41
  "peerDependencies": {
42
- "@effected/jsonc": "^0.15.0",
43
- "@effected/toml": "^0.11.0",
44
- "@effected/yaml": "^0.19.0",
42
+ "@effected/jsonc": "^0.15.1",
43
+ "@effected/toml": "^0.11.1",
44
+ "@effected/yaml": "^0.19.1",
45
45
  "effect": "^4.0.0"
46
46
  },
47
47
  "peerDependenciesMeta": {