mdld-parse 0.3.2 → 0.3.3
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 +3 -3
- package/package.json +5 -5
- package/src/index.js +10 -0
- package/src/parse.js +788 -0
- package/src/serialize.js +531 -0
- package/src/utils.js +305 -0
- package/index.js +0 -1364
package/README.md
CHANGED
|
@@ -91,8 +91,8 @@ Each predicate form determines the graph edge:
|
|
|
91
91
|
| Form | Edge | Example | Meaning |
|
|
92
92
|
|-------|---------|------------------------------|------------------|
|
|
93
93
|
| `p` | S → L | `[Alice] {name}` | literal property |
|
|
94
|
-
| `?p` | S → O | `[NASA]
|
|
95
|
-
| `!p` | O → S
|
|
94
|
+
| `?p` | S → O | `[NASA] {=ex:nasa ?org}` | object property |
|
|
95
|
+
| `!p` | O → S | `[Parent] {=ex:p !hasPart}` | reverse object |
|
|
96
96
|
|
|
97
97
|
## Syntax Reference
|
|
98
98
|
|
|
@@ -282,7 +282,7 @@ Parse MD-LD markdown and return RDF quads with origin tracking.
|
|
|
282
282
|
const result = parse(
|
|
283
283
|
`# Article {=ex:article .Article}
|
|
284
284
|
|
|
285
|
-
[Alice]
|
|
285
|
+
[Alice] {=ex:alice ?author}`,
|
|
286
286
|
{ context: { ex: 'http://example.org/' } }
|
|
287
287
|
);
|
|
288
288
|
|
package/package.json
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mdld-parse",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.3",
|
|
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
|
"main": "index.js",
|
|
7
7
|
"exports": {
|
|
8
|
-
".": "./index.js"
|
|
8
|
+
".": "./src/index.js"
|
|
9
9
|
},
|
|
10
10
|
"files": [
|
|
11
|
-
"index.js"
|
|
11
|
+
"index.js",
|
|
12
|
+
"src"
|
|
12
13
|
],
|
|
13
14
|
"scripts": {
|
|
14
|
-
"test": "node tests.js"
|
|
15
|
-
"spec": "node validate-spec.js"
|
|
15
|
+
"test": "node tests/index.js"
|
|
16
16
|
},
|
|
17
17
|
"keywords": [
|
|
18
18
|
"mdld",
|