@effected/markdown 0.15.0 → 0.15.2
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 +7 -1
- package/index.d.ts +6 -0
- package/package.json +5 -5
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.
|
|
3
|
+
"version": "0.15.2",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "CommonMark and GFM markdown parse, edit and transform schemas for Effect",
|
|
6
6
|
"keywords": [
|
|
@@ -39,10 +39,10 @@
|
|
|
39
39
|
"./package.json": "./package.json"
|
|
40
40
|
},
|
|
41
41
|
"peerDependencies": {
|
|
42
|
-
"@effected/jsonc": "^0.15.
|
|
43
|
-
"@effected/toml": "^0.11.
|
|
44
|
-
"@effected/yaml": "^0.19.
|
|
45
|
-
"effect": "
|
|
42
|
+
"@effected/jsonc": "^0.15.2",
|
|
43
|
+
"@effected/toml": "^0.11.2",
|
|
44
|
+
"@effected/yaml": "^0.19.2",
|
|
45
|
+
"effect": "4.0.2"
|
|
46
46
|
},
|
|
47
47
|
"peerDependenciesMeta": {
|
|
48
48
|
"@effected/jsonc": {
|