@agentshouse/mdmodel 0.1.0-cbb41ab5ebbd2 → 0.1.0-cbd3c46de90bf
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/API.md +27 -93
- package/README.md +0 -1
- package/dist/definition.d.ts.map +1 -1
- package/dist/definition.js +26 -4
- package/dist/document.d.ts +1 -0
- package/dist/document.d.ts.map +1 -1
- package/dist/document.js +21 -12
- package/dist/house-model.d.ts +66 -16
- package/dist/house-model.d.ts.map +1 -1
- package/dist/house-model.js +43 -11
- package/dist/index.d.ts +7 -9
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -7
- package/dist/markdown.d.ts +0 -4
- package/dist/markdown.d.ts.map +1 -1
- package/dist/markdown.js +1 -34
- package/dist/paths.d.ts +1 -0
- package/dist/paths.d.ts.map +1 -1
- package/dist/paths.js +20 -4
- package/dist/query/language.d.ts +2 -0
- package/dist/query/language.d.ts.map +1 -1
- package/dist/query/language.js +3 -2
- package/dist/query/match.d.ts.map +1 -1
- package/dist/query/match.js +3 -24
- package/dist/query/rows.d.ts +4 -0
- package/dist/query/rows.d.ts.map +1 -1
- package/dist/query/rows.js +21 -0
- package/dist/query/sql.d.ts +2 -0
- package/dist/query/sql.d.ts.map +1 -1
- package/dist/query/sql.js +11 -0
- package/dist/query/walk.d.ts +6 -0
- package/dist/query/walk.d.ts.map +1 -1
- package/dist/query/walk.js +12 -1
- package/dist/reserved.d.ts +1 -0
- package/dist/reserved.d.ts.map +1 -1
- package/dist/reserved.js +15 -4
- package/dist/room-types.d.ts +2 -1
- package/dist/room-types.d.ts.map +1 -1
- package/dist/room-types.js +8 -0
- package/dist/types.d.ts +2 -21
- package/dist/types.d.ts.map +1 -1
- package/dist/validate.d.ts.map +1 -1
- package/dist/validate.js +7 -6
- package/dist/view.d.ts +5 -0
- package/dist/view.d.ts.map +1 -0
- package/dist/view.js +27 -0
- package/dist/yaml.d.ts +3 -1
- package/dist/yaml.d.ts.map +1 -1
- package/dist/yaml.js +153 -32
- package/fixtures/README.md +37 -54
- package/fixtures/cases/block-scalar-frontmatter/context.json +1 -0
- package/fixtures/cases/block-scalar-frontmatter/expected.json +1 -0
- package/fixtures/cases/block-scalar-frontmatter/library/notes/literal.md +17 -0
- package/fixtures/cases/block-scalar-frontmatter/library/skills/notes/SKILL.md +10 -0
- package/fixtures/cases/frontmatter-construct/context.json +1 -0
- package/fixtures/cases/frontmatter-construct/expected.json +7 -0
- package/fixtures/cases/frontmatter-construct/library/note.md +6 -0
- package/fixtures/cases/reference-to-any-file-name/context.json +1 -0
- package/fixtures/cases/reference-to-any-file-name/expected.json +1 -0
- package/fixtures/cases/reference-to-any-file-name/library/people/100%.md +4 -0
- package/fixtures/cases/reference-to-any-file-name/library/people/C#.md +4 -0
- package/fixtures/cases/reference-to-any-file-name/library/people/My notes.md +4 -0
- package/fixtures/cases/reference-to-any-file-name/library/people/[draft].md +4 -0
- package/fixtures/cases/reference-to-any-file-name/library/people/c (d).md +4 -0
- package/fixtures/cases/reference-to-any-file-name/library/people/caf/303/251.md +4 -0
- package/fixtures/cases/reference-to-any-file-name/library/people//320/236/321/202/321/207/321/221/321/202.md +4 -0
- package/fixtures/cases/reference-to-any-file-name/library/tasks/bracket.md +9 -0
- package/fixtures/cases/reference-to-any-file-name/library/tasks/cyrillic.md +9 -0
- package/fixtures/cases/reference-to-any-file-name/library/tasks/decomposed.md +9 -0
- package/fixtures/cases/reference-to-any-file-name/library/tasks/hash.md +9 -0
- package/fixtures/cases/reference-to-any-file-name/library/tasks/parenthesis.md +9 -0
- package/fixtures/cases/reference-to-any-file-name/library/tasks/percent.md +9 -0
- package/fixtures/cases/reference-to-any-file-name/library/tasks/spaced.md +9 -0
- package/fixtures/cases/reference-to-any-file-name/schema.yaml +10 -0
- package/fixtures/cases/referenced-missing-non-latin-file/context.json +1 -0
- package/fixtures/cases/referenced-missing-non-latin-file/expected.json +6 -0
- package/fixtures/cases/referenced-missing-non-latin-file/library/tasks/a.md +9 -0
- package/fixtures/cases/referenced-missing-non-latin-file/library/tasks/b.md +9 -0
- package/fixtures/cases/referenced-missing-non-latin-file/schema.yaml +10 -0
- package/fixtures/forms.json +24 -0
- package/fixtures/queries.json +204 -1
- package/package.json +1 -1
- package/dist/divide.d.ts +0 -3
- package/dist/divide.d.ts.map +0 -1
- package/dist/divide.js +0 -321
- package/dist/project.d.ts +0 -22
- package/dist/project.d.ts.map +0 -1
- package/dist/project.js +0 -101
- package/fixtures/division.json +0 -454
- package/fixtures/projection.json +0 -358
package/dist/project.d.ts
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import type { Document, Extent, Projection, ProjectionContext, Refusal } from './types.js';
|
|
2
|
-
export type Piece = Extent & {
|
|
3
|
-
readonly text: string;
|
|
4
|
-
};
|
|
5
|
-
export type Edit = Piece;
|
|
6
|
-
export type Input = {
|
|
7
|
-
readonly values: readonly Piece[];
|
|
8
|
-
readonly ranges: readonly Extent[];
|
|
9
|
-
readonly edits: readonly Edit[];
|
|
10
|
-
};
|
|
11
|
-
export type InputResult = {
|
|
12
|
-
readonly ok: true;
|
|
13
|
-
readonly input: Input;
|
|
14
|
-
} | {
|
|
15
|
-
readonly ok: false;
|
|
16
|
-
readonly refusal: Refusal;
|
|
17
|
-
};
|
|
18
|
-
export declare function firstEditFrom(edits: readonly Edit[], start: number): number;
|
|
19
|
-
export declare function rangeText(content: string, range: Extent, edits: readonly Edit[]): string;
|
|
20
|
-
export declare function projectionInput(document: Document, file: string, context: ProjectionContext): InputResult;
|
|
21
|
-
export declare function project(document: Document, file: string, context?: ProjectionContext): Projection;
|
|
22
|
-
//# sourceMappingURL=project.d.ts.map
|
package/dist/project.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"project.d.ts","sourceRoot":"","sources":["../src/project.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAE,UAAU,EAAE,iBAAiB,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAG3F,MAAM,MAAM,KAAK,GAAG,MAAM,GAAG;IAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC;AAEvD,MAAM,MAAM,IAAI,GAAG,KAAK,CAAC;AAEzB,MAAM,MAAM,KAAK,GAAG;IAClB,QAAQ,CAAC,MAAM,EAAE,SAAS,KAAK,EAAE,CAAC;IAClC,QAAQ,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CAAC;IACnC,QAAQ,CAAC,KAAK,EAAE,SAAS,IAAI,EAAE,CAAC;CACjC,CAAC;AAEF,MAAM,MAAM,WAAW,GACnB;IAAE,QAAQ,CAAC,EAAE,EAAE,IAAI,CAAC;IAAC,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAA;CAAE,GAC5C;IAAE,QAAQ,CAAC,EAAE,EAAE,KAAK,CAAC;IAAC,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAA;CAAE,CAAC;AAqCtD,wBAAgB,aAAa,CAAC,KAAK,EAAE,SAAS,IAAI,EAAE,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAS3E;AAED,wBAAgB,SAAS,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,SAAS,IAAI,EAAE,GAAG,MAAM,CAWxF;AAOD,wBAAgB,eAAe,CAC7B,QAAQ,EAAE,QAAQ,EAClB,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,iBAAiB,GACzB,WAAW,CA4Bb;AAED,wBAAgB,OAAO,CACrB,QAAQ,EAAE,QAAQ,EAClB,IAAI,EAAE,MAAM,EACZ,OAAO,GAAE,iBAA2C,GACnD,UAAU,CAMZ"}
|
package/dist/project.js
DELETED
|
@@ -1,101 +0,0 @@
|
|
|
1
|
-
import { bodyWith, readingOf } from './document.js';
|
|
2
|
-
import { classifyHref } from './paths.js';
|
|
3
|
-
import { refusal } from './refuse.js';
|
|
4
|
-
import { bodyStartOf } from './yaml.js';
|
|
5
|
-
function internalEdits(content, reading, file, documentTargets) {
|
|
6
|
-
const internal = new Set();
|
|
7
|
-
const uses = reading.uses
|
|
8
|
-
.filter((use) => {
|
|
9
|
-
const resolved = classifyHref(file, use.destination.href);
|
|
10
|
-
return (resolved.kind === 'room' || (resolved.kind === 'path' && documentTargets.has(resolved.path)));
|
|
11
|
-
})
|
|
12
|
-
.sort((left, right) => left.start - right.start);
|
|
13
|
-
const edits = [];
|
|
14
|
-
for (let index = uses.length - 1; index >= 0; index -= 1) {
|
|
15
|
-
const use = uses[index];
|
|
16
|
-
internal.add(use.destination.start);
|
|
17
|
-
const label = { start: use.labelStart, end: use.labelEnd };
|
|
18
|
-
const inner = [];
|
|
19
|
-
for (let nested = index + 1; nested < uses.length; nested += 1) {
|
|
20
|
-
const edit = edits[uses.length - 1 - nested];
|
|
21
|
-
if (edit.start >= label.end)
|
|
22
|
-
break;
|
|
23
|
-
if (edit.end <= label.end)
|
|
24
|
-
inner.push(edit);
|
|
25
|
-
}
|
|
26
|
-
edits.push({ start: use.start, end: use.end, text: rangeText(content, label, inner) });
|
|
27
|
-
}
|
|
28
|
-
for (const block of reading.definitions) {
|
|
29
|
-
if (!internal.has(block.destination.start))
|
|
30
|
-
continue;
|
|
31
|
-
edits.push({ start: block.start, end: block.end, text: '' });
|
|
32
|
-
}
|
|
33
|
-
return edits.sort((left, right) => left.start - right.start);
|
|
34
|
-
}
|
|
35
|
-
export function firstEditFrom(edits, start) {
|
|
36
|
-
let low = 0;
|
|
37
|
-
let high = edits.length;
|
|
38
|
-
while (low < high) {
|
|
39
|
-
const middle = (low + high) >>> 1;
|
|
40
|
-
if (edits[middle].start < start)
|
|
41
|
-
low = middle + 1;
|
|
42
|
-
else
|
|
43
|
-
high = middle;
|
|
44
|
-
}
|
|
45
|
-
return low;
|
|
46
|
-
}
|
|
47
|
-
export function rangeText(content, range, edits) {
|
|
48
|
-
let text = '';
|
|
49
|
-
let cursor = range.start;
|
|
50
|
-
for (let index = firstEditFrom(edits, range.start); index < edits.length; index += 1) {
|
|
51
|
-
const edit = edits[index];
|
|
52
|
-
if (edit.start > range.end)
|
|
53
|
-
break;
|
|
54
|
-
if (edit.start < cursor || edit.end > range.end)
|
|
55
|
-
continue;
|
|
56
|
-
text += content.slice(cursor, edit.start) + edit.text;
|
|
57
|
-
cursor = edit.end;
|
|
58
|
-
}
|
|
59
|
-
return text + content.slice(cursor, range.end);
|
|
60
|
-
}
|
|
61
|
-
function linked(edits, range) {
|
|
62
|
-
const at = firstEditFrom(edits, range.start);
|
|
63
|
-
return at < edits.length && edits[at].start < range.end;
|
|
64
|
-
}
|
|
65
|
-
export function projectionInput(document, file, context) {
|
|
66
|
-
const content = document.content;
|
|
67
|
-
const bodyStart = bodyStartOf(content);
|
|
68
|
-
const reading = readingOf(document);
|
|
69
|
-
const edits = internalEdits(content, reading, file, new Set(context.documentTargets));
|
|
70
|
-
const declared = document.type;
|
|
71
|
-
const definition = context.definition;
|
|
72
|
-
if (definition === undefined && declared !== undefined && declared !== 'any')
|
|
73
|
-
return { ok: false, refusal: refusal(file, 'unknown-type') };
|
|
74
|
-
const body = definition === undefined ? null : bodyWith(document, definition);
|
|
75
|
-
if (body === null || !('top' in body)) {
|
|
76
|
-
return {
|
|
77
|
-
ok: true,
|
|
78
|
-
input: { values: [], ranges: [{ start: bodyStart, end: content.length }], edits },
|
|
79
|
-
};
|
|
80
|
-
}
|
|
81
|
-
const values = body.prose
|
|
82
|
-
.filter((one) => !one.markdown)
|
|
83
|
-
.map((one) => ({
|
|
84
|
-
start: one.start,
|
|
85
|
-
end: one.end,
|
|
86
|
-
text: `${linked(edits, one) ? rangeText(content, one, edits) : one.text}\n\n`,
|
|
87
|
-
}));
|
|
88
|
-
const ranges = [
|
|
89
|
-
...body.prose.filter((one) => one.markdown).map(({ start, end }) => ({ start, end })),
|
|
90
|
-
...body.free,
|
|
91
|
-
].sort((left, right) => left.start - right.start);
|
|
92
|
-
return { ok: true, input: { values, ranges, edits } };
|
|
93
|
-
}
|
|
94
|
-
export function project(document, file, context = { documentTargets: [] }) {
|
|
95
|
-
const result = projectionInput(document, file, context);
|
|
96
|
-
if (!result.ok)
|
|
97
|
-
return { ok: false, refusal: result.refusal };
|
|
98
|
-
const { values, ranges, edits } = result.input;
|
|
99
|
-
const prose = ranges.map((range) => rangeText(document.content, range, edits)).join('');
|
|
100
|
-
return { ok: true, text: values.map((value) => value.text).join('') + prose };
|
|
101
|
-
}
|
package/fixtures/division.json
DELETED
|
@@ -1,454 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"schema": "task:\n type: object\n properties:\n name: { type: string }\n status: { enum: [open, done] }\n description: { type: string, contentMediaType: text/markdown, title: Description }\n acceptance: { type: array, items: { type: string, reference: person }, title: Acceptance }\n required: [status]\nperson: {}\n",
|
|
3
|
-
"cases": [
|
|
4
|
-
{
|
|
5
|
-
"name": "a Document whose whole input fits the bound is one Span carrying its projection",
|
|
6
|
-
"file": "tasks/one.md",
|
|
7
|
-
"source": "---\ntype: task\n---\n# Ship the release\n\n- **status**: open\n- **Acceptance**:\n - [Ana](people/ana.md)\n\nPreamble prose.\n\n## Description\n\nBody of the description.\n",
|
|
8
|
-
"documentTargets": [],
|
|
9
|
-
"definition": "task",
|
|
10
|
-
"bound": 4096,
|
|
11
|
-
"expected": {
|
|
12
|
-
"ok": true,
|
|
13
|
-
"spans": [
|
|
14
|
-
{
|
|
15
|
-
"text": "Ship the release\n\nPreamble prose.\n\nBody of the description.\n",
|
|
16
|
-
"source": "Ship the release\n\n- **status**: open\n- **Acceptance**:\n - [Ana](people/ana.md)\n\nPreamble prose.\n\n## Description\n\nBody of the description.\n"
|
|
17
|
-
}
|
|
18
|
-
]
|
|
19
|
-
}
|
|
20
|
-
},
|
|
21
|
-
{
|
|
22
|
-
"name": "an input over the bound packs adjacent values, ranges and heading nodes into whole units",
|
|
23
|
-
"file": "tasks/one.md",
|
|
24
|
-
"source": "---\ntype: task\n---\n# Ship the release\n\n- **status**: open\n- **Acceptance**:\n - [Ana](people/ana.md)\n\nPreamble prose.\n\n## Description\n\nBody of the description.\n\n## Notes\n\nNotes prose.\n",
|
|
25
|
-
"documentTargets": [],
|
|
26
|
-
"definition": "task",
|
|
27
|
-
"bound": 45,
|
|
28
|
-
"expected": {
|
|
29
|
-
"ok": true,
|
|
30
|
-
"spans": [
|
|
31
|
-
{
|
|
32
|
-
"text": "Ship the release\n\nPreamble prose.\n\n",
|
|
33
|
-
"source": "Ship the release\n\n- **status**: open\n- **Acceptance**:\n - [Ana](people/ana.md)\n\nPreamble prose.\n\n"
|
|
34
|
-
},
|
|
35
|
-
{
|
|
36
|
-
"text": "Body of the description.\n\n",
|
|
37
|
-
"source": "Body of the description.\n\n"
|
|
38
|
-
},
|
|
39
|
-
{
|
|
40
|
-
"text": "## Notes\n\nNotes prose.\n",
|
|
41
|
-
"source": "## Notes\n\nNotes prose.\n"
|
|
42
|
-
}
|
|
43
|
-
]
|
|
44
|
-
}
|
|
45
|
-
},
|
|
46
|
-
{
|
|
47
|
-
"name": "a heading node over the bound divides into adjacent blocks carrying its own heading",
|
|
48
|
-
"file": "tasks/one.md",
|
|
49
|
-
"source": "---\ntype: task\n---\n# Task\n\n- **status**: open\n\n## Overview\n\nFirst paragraph of the overview.\n\nSecond paragraph of the overview.\n\n## Notes\n\nShort note.\n",
|
|
50
|
-
"documentTargets": [],
|
|
51
|
-
"definition": "task",
|
|
52
|
-
"bound": 50,
|
|
53
|
-
"expected": {
|
|
54
|
-
"ok": true,
|
|
55
|
-
"spans": [
|
|
56
|
-
{
|
|
57
|
-
"text": "Task\n\n",
|
|
58
|
-
"source": "Task"
|
|
59
|
-
},
|
|
60
|
-
{
|
|
61
|
-
"text": "## Overview\n\nFirst paragraph of the overview.\n\n",
|
|
62
|
-
"source": "## Overview\n\nFirst paragraph of the overview.\n\n"
|
|
63
|
-
},
|
|
64
|
-
{
|
|
65
|
-
"text": "## Overview\n\nSecond paragraph of the overview.\n\n",
|
|
66
|
-
"source": "Second paragraph of the overview.\n\n"
|
|
67
|
-
},
|
|
68
|
-
{
|
|
69
|
-
"text": "## Notes\n\nShort note.\n",
|
|
70
|
-
"source": "## Notes\n\nShort note.\n"
|
|
71
|
-
}
|
|
72
|
-
]
|
|
73
|
-
}
|
|
74
|
-
},
|
|
75
|
-
{
|
|
76
|
-
"name": "a node continuation and the next whole sibling stay in their own Spans",
|
|
77
|
-
"file": "tasks/one.md",
|
|
78
|
-
"source": "---\ntype: task\n---\n# Task\n\n- **status**: open\n\n## Overview\n\nFirst paragraph of the overview.\n\nSecond paragraph of the overview.\n\n## Notes\n\nShort note.\n",
|
|
79
|
-
"documentTargets": [],
|
|
80
|
-
"definition": "task",
|
|
81
|
-
"bound": 75,
|
|
82
|
-
"expected": {
|
|
83
|
-
"ok": true,
|
|
84
|
-
"spans": [
|
|
85
|
-
{
|
|
86
|
-
"text": "Task\n\n",
|
|
87
|
-
"source": "Task"
|
|
88
|
-
},
|
|
89
|
-
{
|
|
90
|
-
"text": "## Overview\n\nFirst paragraph of the overview.\n\n",
|
|
91
|
-
"source": "## Overview\n\nFirst paragraph of the overview.\n\n"
|
|
92
|
-
},
|
|
93
|
-
{
|
|
94
|
-
"text": "## Overview\n\nSecond paragraph of the overview.\n\n",
|
|
95
|
-
"source": "Second paragraph of the overview.\n\n"
|
|
96
|
-
},
|
|
97
|
-
{
|
|
98
|
-
"text": "## Notes\n\nShort note.\n",
|
|
99
|
-
"source": "## Notes\n\nShort note.\n"
|
|
100
|
-
}
|
|
101
|
-
]
|
|
102
|
-
}
|
|
103
|
-
},
|
|
104
|
-
{
|
|
105
|
-
"name": "a continuation Span carries its own node heading and never an ancestor heading",
|
|
106
|
-
"file": "tasks/one.md",
|
|
107
|
-
"source": "---\ntype: task\n---\n# Task\n\n- **status**: open\n\n## Overview\n\nIntro line.\n\n### Detail\n\nDetail paragraph one.\n\nDetail paragraph two.\n",
|
|
108
|
-
"documentTargets": [],
|
|
109
|
-
"definition": "task",
|
|
110
|
-
"bound": 40,
|
|
111
|
-
"expected": {
|
|
112
|
-
"ok": true,
|
|
113
|
-
"spans": [
|
|
114
|
-
{
|
|
115
|
-
"text": "Task\n\n",
|
|
116
|
-
"source": "Task"
|
|
117
|
-
},
|
|
118
|
-
{
|
|
119
|
-
"text": "## Overview\n\nIntro line.\n\n",
|
|
120
|
-
"source": "## Overview\n\nIntro line.\n\n"
|
|
121
|
-
},
|
|
122
|
-
{
|
|
123
|
-
"text": "### Detail\n\nDetail paragraph one.\n\n",
|
|
124
|
-
"source": "### Detail\n\nDetail paragraph one.\n\n"
|
|
125
|
-
},
|
|
126
|
-
{
|
|
127
|
-
"text": "### Detail\n\nDetail paragraph two.\n",
|
|
128
|
-
"source": "Detail paragraph two.\n"
|
|
129
|
-
}
|
|
130
|
-
]
|
|
131
|
-
}
|
|
132
|
-
},
|
|
133
|
-
{
|
|
134
|
-
"name": "a block over the bound divides into sentences that repeat their predecessor",
|
|
135
|
-
"file": "tasks/one.md",
|
|
136
|
-
"source": "---\ntype: task\n---\n# Task\n\n- **status**: open\n\n## Overview\n\nOne. Two. Three. Four.\n",
|
|
137
|
-
"documentTargets": [],
|
|
138
|
-
"definition": "task",
|
|
139
|
-
"bound": 30,
|
|
140
|
-
"expected": {
|
|
141
|
-
"ok": true,
|
|
142
|
-
"spans": [
|
|
143
|
-
{
|
|
144
|
-
"text": "Task\n\n",
|
|
145
|
-
"source": "Task"
|
|
146
|
-
},
|
|
147
|
-
{
|
|
148
|
-
"text": "## Overview\n\nOne. Two. Three. ",
|
|
149
|
-
"source": "## Overview\n\nOne. Two. Three. "
|
|
150
|
-
},
|
|
151
|
-
{
|
|
152
|
-
"text": "## Overview\n\nThree. Four.\n",
|
|
153
|
-
"source": "Three. Four.\n"
|
|
154
|
-
}
|
|
155
|
-
]
|
|
156
|
-
}
|
|
157
|
-
},
|
|
158
|
-
{
|
|
159
|
-
"name": "a single sentence over the bound divides at a bound cut inside it",
|
|
160
|
-
"file": "tasks/one.md",
|
|
161
|
-
"source": "---\ntype: task\n---\n# Task\n\n- **status**: open\n\n## Overview\n\naaaa bbbb cccc dddd eeee\n",
|
|
162
|
-
"documentTargets": [],
|
|
163
|
-
"definition": "task",
|
|
164
|
-
"bound": 20,
|
|
165
|
-
"expected": {
|
|
166
|
-
"ok": true,
|
|
167
|
-
"spans": [
|
|
168
|
-
{
|
|
169
|
-
"text": "Task\n\n",
|
|
170
|
-
"source": "Task"
|
|
171
|
-
},
|
|
172
|
-
{
|
|
173
|
-
"text": "## Overview\n\naaaa",
|
|
174
|
-
"source": "## Overview\n\naaaa"
|
|
175
|
-
},
|
|
176
|
-
{
|
|
177
|
-
"text": "## Overview\n\n bbbb",
|
|
178
|
-
"source": " bbbb"
|
|
179
|
-
},
|
|
180
|
-
{
|
|
181
|
-
"text": "## Overview\n\n cccc",
|
|
182
|
-
"source": " cccc"
|
|
183
|
-
},
|
|
184
|
-
{
|
|
185
|
-
"text": "## Overview\n\n dddd",
|
|
186
|
-
"source": " dddd"
|
|
187
|
-
},
|
|
188
|
-
{
|
|
189
|
-
"text": "## Overview\n\n eeee\n",
|
|
190
|
-
"source": " eeee\n"
|
|
191
|
-
}
|
|
192
|
-
]
|
|
193
|
-
}
|
|
194
|
-
},
|
|
195
|
-
{
|
|
196
|
-
"name": "an untyped input with no definition descends the same ladder",
|
|
197
|
-
"file": "notes/one.md",
|
|
198
|
-
"source": "# Title\n\nIntro paragraph about the whole thing.\n\n## Alpha\n\nAlpha one. Alpha two.\n\n### Deep\n\nDeep prose here.\n\n## Beta\n\nBeta prose.\n",
|
|
199
|
-
"documentTargets": [],
|
|
200
|
-
"definition": null,
|
|
201
|
-
"bound": 60,
|
|
202
|
-
"expected": {
|
|
203
|
-
"ok": true,
|
|
204
|
-
"spans": [
|
|
205
|
-
{
|
|
206
|
-
"text": "# Title\n\nIntro paragraph about the whole thing.\n\n",
|
|
207
|
-
"source": "# Title\n\nIntro paragraph about the whole thing.\n\n"
|
|
208
|
-
},
|
|
209
|
-
{
|
|
210
|
-
"text": "## Alpha\n\nAlpha one. Alpha two.\n\n",
|
|
211
|
-
"source": "## Alpha\n\nAlpha one. Alpha two.\n\n"
|
|
212
|
-
},
|
|
213
|
-
{
|
|
214
|
-
"text": "### Deep\n\nDeep prose here.\n\n",
|
|
215
|
-
"source": "### Deep\n\nDeep prose here.\n\n"
|
|
216
|
-
},
|
|
217
|
-
{
|
|
218
|
-
"text": "## Beta\n\nBeta prose.\n",
|
|
219
|
-
"source": "## Beta\n\nBeta prose.\n"
|
|
220
|
-
}
|
|
221
|
-
]
|
|
222
|
-
}
|
|
223
|
-
},
|
|
224
|
-
{
|
|
225
|
-
"name": "a Document that declares the built-in any type divides its body after the fence",
|
|
226
|
-
"file": "notes/two.md",
|
|
227
|
-
"source": "---\ntype: any\ntitle: Note\n---\n\n## Notes\n\nRead it.\n",
|
|
228
|
-
"documentTargets": [],
|
|
229
|
-
"definition": null,
|
|
230
|
-
"bound": 4096,
|
|
231
|
-
"expected": {
|
|
232
|
-
"ok": true,
|
|
233
|
-
"spans": [
|
|
234
|
-
{
|
|
235
|
-
"text": "\n## Notes\n\nRead it.\n",
|
|
236
|
-
"source": "\n## Notes\n\nRead it.\n"
|
|
237
|
-
}
|
|
238
|
-
]
|
|
239
|
-
}
|
|
240
|
-
},
|
|
241
|
-
{
|
|
242
|
-
"name": "an internal link embeds its label and addresses the destination the author wrote",
|
|
243
|
-
"file": "tasks/one.md",
|
|
244
|
-
"source": "---\ntype: task\n---\n# Task\n\n- **status**: open\n\n## Overview\n\nRead [the plan](../plans/q3.md) before starting.\n\n## Notes\n\nShort note.\n",
|
|
245
|
-
"documentTargets": [
|
|
246
|
-
"plans/q3.md"
|
|
247
|
-
],
|
|
248
|
-
"definition": "task",
|
|
249
|
-
"bound": 50,
|
|
250
|
-
"expected": {
|
|
251
|
-
"ok": true,
|
|
252
|
-
"spans": [
|
|
253
|
-
{
|
|
254
|
-
"text": "Task\n\n",
|
|
255
|
-
"source": "Task"
|
|
256
|
-
},
|
|
257
|
-
{
|
|
258
|
-
"text": "## Overview\n\nRead the plan before starting.\n\n",
|
|
259
|
-
"source": "## Overview\n\nRead [the plan](../plans/q3.md) before starting.\n\n"
|
|
260
|
-
},
|
|
261
|
-
{
|
|
262
|
-
"text": "## Notes\n\nShort note.\n",
|
|
263
|
-
"source": "## Notes\n\nShort note.\n"
|
|
264
|
-
}
|
|
265
|
-
]
|
|
266
|
-
}
|
|
267
|
-
},
|
|
268
|
-
{
|
|
269
|
-
"name": "a value list that holds no prose stays outside the text and inside the extent",
|
|
270
|
-
"file": "tasks/one.md",
|
|
271
|
-
"source": "---\ntype: task\n---\n# Task\n\n- **status**: open\n- **Acceptance**:\n - [Ana](people/ana.md)\n\nPreamble prose.\n\n## Notes\n\nShort note.\n",
|
|
272
|
-
"documentTargets": [],
|
|
273
|
-
"definition": "task",
|
|
274
|
-
"bound": 4096,
|
|
275
|
-
"expected": {
|
|
276
|
-
"ok": true,
|
|
277
|
-
"spans": [
|
|
278
|
-
{
|
|
279
|
-
"text": "Task\n\nPreamble prose.\n\n## Notes\n\nShort note.\n",
|
|
280
|
-
"source": "Task\n\n- **status**: open\n- **Acceptance**:\n - [Ana](people/ana.md)\n\nPreamble prose.\n\n## Notes\n\nShort note.\n"
|
|
281
|
-
}
|
|
282
|
-
]
|
|
283
|
-
}
|
|
284
|
-
},
|
|
285
|
-
{
|
|
286
|
-
"name": "a Document that declares a type the caller supplies no definition for is refused",
|
|
287
|
-
"file": "tasks/one.md",
|
|
288
|
-
"source": "---\ntype: task\n---\n# Ship the release\n\n- **status**: open\n- **Acceptance**:\n - [Ana](people/ana.md)\n\nPreamble prose.\n\n## Description\n\nBody of the description.\n",
|
|
289
|
-
"documentTargets": [],
|
|
290
|
-
"definition": null,
|
|
291
|
-
"bound": 4096,
|
|
292
|
-
"expected": {
|
|
293
|
-
"ok": false,
|
|
294
|
-
"refusal": {
|
|
295
|
-
"file": "tasks/one.md",
|
|
296
|
-
"rule": "unknown-type"
|
|
297
|
-
}
|
|
298
|
-
}
|
|
299
|
-
},
|
|
300
|
-
{
|
|
301
|
-
"name": "a bound that cannot hold one whole character is refused before any division",
|
|
302
|
-
"file": "notes/one.md",
|
|
303
|
-
"source": "## Notes\n\nShort note.\n",
|
|
304
|
-
"documentTargets": [],
|
|
305
|
-
"definition": null,
|
|
306
|
-
"bound": 1,
|
|
307
|
-
"expected": {
|
|
308
|
-
"ok": false,
|
|
309
|
-
"refusal": {
|
|
310
|
-
"file": "notes/one.md",
|
|
311
|
-
"rule": "division-bound"
|
|
312
|
-
}
|
|
313
|
-
}
|
|
314
|
-
},
|
|
315
|
-
{
|
|
316
|
-
"name": "a free-text value written with an escape embeds bare and addresses the escape it was written with",
|
|
317
|
-
"file": "tasks/one.md",
|
|
318
|
-
"source": "---\ntype: task\n---\n# Ship: the release \\#\n\n- **status**: open\n\nBody prose.\n",
|
|
319
|
-
"documentTargets": [],
|
|
320
|
-
"definition": "task",
|
|
321
|
-
"bound": 4096,
|
|
322
|
-
"expected": {
|
|
323
|
-
"ok": true,
|
|
324
|
-
"spans": [
|
|
325
|
-
{
|
|
326
|
-
"text": "Ship: the release #\n\nBody prose.\n",
|
|
327
|
-
"source": "Ship: the release \\#\n\n- **status**: open\n\nBody prose.\n"
|
|
328
|
-
}
|
|
329
|
-
]
|
|
330
|
-
}
|
|
331
|
-
},
|
|
332
|
-
{
|
|
333
|
-
"name": "sentence division reads every terminator and closer and drops a carry the bound cannot hold",
|
|
334
|
-
"file": "notes/three.md",
|
|
335
|
-
"source": "## Ask\n\nReady? Go! He said \"no.\" Then (silence.) Done.\n",
|
|
336
|
-
"documentTargets": [],
|
|
337
|
-
"definition": null,
|
|
338
|
-
"bound": 30,
|
|
339
|
-
"expected": {
|
|
340
|
-
"ok": true,
|
|
341
|
-
"spans": [
|
|
342
|
-
{
|
|
343
|
-
"text": "## Ask\n\nReady? Go! ",
|
|
344
|
-
"source": "## Ask\n\nReady? Go! "
|
|
345
|
-
},
|
|
346
|
-
{
|
|
347
|
-
"text": "## Ask\n\nGo! He said \"no.\" ",
|
|
348
|
-
"source": "Go! He said \"no.\" "
|
|
349
|
-
},
|
|
350
|
-
{
|
|
351
|
-
"text": "## Ask\n\nThen (silence.) Done.\n",
|
|
352
|
-
"source": "Then (silence.) Done.\n"
|
|
353
|
-
}
|
|
354
|
-
]
|
|
355
|
-
}
|
|
356
|
-
},
|
|
357
|
-
{
|
|
358
|
-
"name": "a heading with no body of its own leads the first child node instead of standing alone",
|
|
359
|
-
"file": "notes/four.md",
|
|
360
|
-
"source": "## Part\n\n### Alpha\n\nAlpha prose that is long enough to matter.\n\n### Beta\n\nBeta prose.\n",
|
|
361
|
-
"documentTargets": [],
|
|
362
|
-
"definition": null,
|
|
363
|
-
"bound": 70,
|
|
364
|
-
"expected": {
|
|
365
|
-
"ok": true,
|
|
366
|
-
"spans": [
|
|
367
|
-
{
|
|
368
|
-
"text": "## Part\n\n### Alpha\n\nAlpha prose that is long enough to matter.\n\n",
|
|
369
|
-
"source": "## Part\n\n### Alpha\n\nAlpha prose that is long enough to matter.\n\n"
|
|
370
|
-
},
|
|
371
|
-
{
|
|
372
|
-
"text": "### Beta\n\nBeta prose.\n",
|
|
373
|
-
"source": "### Beta\n\nBeta prose.\n"
|
|
374
|
-
}
|
|
375
|
-
]
|
|
376
|
-
}
|
|
377
|
-
},
|
|
378
|
-
{
|
|
379
|
-
"name": "a heading the bound cannot hold beside any text is not repeated",
|
|
380
|
-
"file": "notes/five.md",
|
|
381
|
-
"source": "## An overview of the release\n\nFirst paragraph here.\n\nSecond paragraph here.\n",
|
|
382
|
-
"documentTargets": [],
|
|
383
|
-
"definition": null,
|
|
384
|
-
"bound": 25,
|
|
385
|
-
"expected": {
|
|
386
|
-
"ok": true,
|
|
387
|
-
"spans": [
|
|
388
|
-
{
|
|
389
|
-
"text": "## An overview of the",
|
|
390
|
-
"source": "## An overview of the"
|
|
391
|
-
},
|
|
392
|
-
{
|
|
393
|
-
"text": " release\n\nFirst paragraph",
|
|
394
|
-
"source": " release\n\nFirst paragraph"
|
|
395
|
-
},
|
|
396
|
-
{
|
|
397
|
-
"text": " here.\n\n",
|
|
398
|
-
"source": " here.\n\n"
|
|
399
|
-
},
|
|
400
|
-
{
|
|
401
|
-
"text": "Second paragraph here.\n",
|
|
402
|
-
"source": "Second paragraph here.\n"
|
|
403
|
-
}
|
|
404
|
-
]
|
|
405
|
-
}
|
|
406
|
-
},
|
|
407
|
-
{
|
|
408
|
-
"name": "a loose list is one block of its heading node",
|
|
409
|
-
"file": "notes/list.md",
|
|
410
|
-
"source": "## L\n\nIntro.\n\n- one\n\n- two\n\nAfter.\n",
|
|
411
|
-
"documentTargets": [],
|
|
412
|
-
"definition": null,
|
|
413
|
-
"bound": 22,
|
|
414
|
-
"expected": {
|
|
415
|
-
"ok": true,
|
|
416
|
-
"spans": [
|
|
417
|
-
{
|
|
418
|
-
"text": "## L\n\nIntro.\n\n",
|
|
419
|
-
"source": "## L\n\nIntro.\n\n"
|
|
420
|
-
},
|
|
421
|
-
{
|
|
422
|
-
"text": "## L\n\n- one\n\n- two\n\n",
|
|
423
|
-
"source": "- one\n\n- two\n\n"
|
|
424
|
-
},
|
|
425
|
-
{
|
|
426
|
-
"text": "## L\n\nAfter.\n",
|
|
427
|
-
"source": "After.\n"
|
|
428
|
-
}
|
|
429
|
-
]
|
|
430
|
-
}
|
|
431
|
-
},
|
|
432
|
-
{
|
|
433
|
-
"name": "a list right after a paragraph is a block of its own",
|
|
434
|
-
"file": "notes/list.md",
|
|
435
|
-
"source": "## L\n\nIntro.\n- one\n- two\n",
|
|
436
|
-
"documentTargets": [],
|
|
437
|
-
"definition": null,
|
|
438
|
-
"bound": 20,
|
|
439
|
-
"expected": {
|
|
440
|
-
"ok": true,
|
|
441
|
-
"spans": [
|
|
442
|
-
{
|
|
443
|
-
"text": "## L\n\nIntro.\n",
|
|
444
|
-
"source": "## L\n\nIntro.\n"
|
|
445
|
-
},
|
|
446
|
-
{
|
|
447
|
-
"text": "## L\n\n- one\n- two\n",
|
|
448
|
-
"source": "- one\n- two\n"
|
|
449
|
-
}
|
|
450
|
-
]
|
|
451
|
-
}
|
|
452
|
-
}
|
|
453
|
-
]
|
|
454
|
-
}
|