mdld-parse 0.9.6 → 0.9.8
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/README.md +11 -42
- package/dist/README.md +11 -42
- package/dist/docs/Parser.md +2 -1
- package/dist/docs/primary-subject.md +3 -2
- package/dist/examples/demo/journal.md +27 -86
- package/dist/examples/demo/project.md +50 -64
- package/dist/examples/demo/recipe.md +24 -69
- package/dist/examples/demo/research.md +37 -79
- package/dist/examples/demo/space-mission.md +32 -103
- package/dist/index.html +185 -415
- package/dist/index.js +4 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -748,7 +748,8 @@ function I(t, n = {}) {
|
|
|
748
748
|
let u = {
|
|
749
749
|
subject: o.primarySubject,
|
|
750
750
|
type: o.primaryType,
|
|
751
|
-
label: o.primaryLabel
|
|
751
|
+
label: o.primaryLabel,
|
|
752
|
+
comment: o.primaryComment
|
|
752
753
|
};
|
|
753
754
|
return {
|
|
754
755
|
quads: o.quads,
|
|
@@ -1022,7 +1023,7 @@ function z(e, t, n, r, i, a, o, s, c, l = null, u = null, d = null, f = null) {
|
|
|
1022
1023
|
} else n.add(p);
|
|
1023
1024
|
} else {
|
|
1024
1025
|
let n = v(p.subject, p.predicate, p.object);
|
|
1025
|
-
t.set(n, p), e.push(p), f && (!f.primaryType && o.value === "http://www.w3.org/1999/02/22-rdf-syntax-ns#type" && (f.primaryType = s.value), !f.primaryLabel && o.value === "http://www.w3.org/2000/01/rdf-schema#label" && s.termType === "Literal" && (f.primaryLabel = s.value)), Me(p, c, l, u, d);
|
|
1026
|
+
t.set(n, p), e.push(p), f && (!f.primaryType && o.value === "http://www.w3.org/1999/02/22-rdf-syntax-ns#type" && (f.primaryType = s.value), !f.primaryLabel && o.value === "http://www.w3.org/2000/01/rdf-schema#label" && s.termType === "Literal" && (f.primaryLabel = s.value), !f.primaryComment && o.value === "http://www.w3.org/2000/01/rdf-schema#comment" && s.termType === "Literal" && (f.primaryComment = s.value)), Me(p, c, l, u, d);
|
|
1026
1027
|
let m = ye(i, a, o, l);
|
|
1027
1028
|
r.set(n, m), f.currentBlock && i.id === f.currentBlock.id && (f.currentBlock.quadKeys || (f.currentBlock.quadKeys = []), f.currentBlock.quadKeys.push(n));
|
|
1028
1029
|
}
|
|
@@ -1303,7 +1304,7 @@ function Ke(t, n, r = null) {
|
|
|
1303
1304
|
let a = K(e, n), { types: s, literals: c, objects: l } = Ee(r), u = o.has(e), d = u ? o.get(e) : Be(e, n), f = s.length > 0 ? s.map((e) => "." + K(e.object.value, n)).sort().join(" ") : "";
|
|
1304
1305
|
u && (f += (f ? " " : "") + "label");
|
|
1305
1306
|
let p = f ? " " + f : "";
|
|
1306
|
-
i.push(`# ${d} {=${a}${p}}\n
|
|
1307
|
+
i.push(`# ${d} {=${a}${p}}\n`);
|
|
1307
1308
|
let m = u ? o.get(e) : null;
|
|
1308
1309
|
F(c).forEach((e) => {
|
|
1309
1310
|
e.predicate.value === "http://www.w3.org/2000/01/rdf-schema#label" && e.object.value === m || i.push(we(e, n));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mdld-parse",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.8",
|
|
4
4
|
"description": "A standards-compliant parser for **MD-LD (Markdown-Linked Data)** — a human-friendly RDF authoring format that extends Markdown with semantic annotations.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"packageManager": "pnpm@10.33.4+sha512.1c67b3b359b2d408119ba1ed289f34b8fc3c6873412bec6fd264fbdc82489e510fcbecb9ce9d22dae7f3b76269d8441046014bdca53b9979cd7a561ad631b800",
|