Skip to content
This repository was archived by the owner on Feb 28, 2022. It is now read-only.

Commit 4d69499

Browse files
committed
fix(markdown): Fix handling of references in Markdown validation
Adds the neccessary schema for referenceType and a corresponding integration test fixes #159
1 parent 816ede5 commit 4d69499

File tree

4 files changed

+48
-1
lines changed

4 files changed

+48
-1
lines changed

docs/mdast.schema.json

Lines changed: 13 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/mdast.schema.md

Lines changed: 22 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/schemas/mdast.schema.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,15 @@
152152
"type": ["string", "null"],
153153
"description": "An alt field should be present. It represents equivalent content for environments that cannot represent the node as intended."
154154
},
155+
"referenceType": {
156+
"enum": ["shortcut", "collapsed", "full"],
157+
"description": "Represents the explicitness of a reference.",
158+
"meta:enum": {
159+
"shortcut": "the reference is implicit, its identifier inferred from its content",
160+
"collapsed": "the reference is explicit, its identifier inferred from its content",
161+
"full": "the reference is explicit, its identifier explicitly set"
162+
}
163+
},
155164
"data": {
156165
"type": "object",
157166
"description": "data is guaranteed to never be specified by unist or specifications implementing unist. Free data space.",

test/fixtures/index-modified.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,7 @@ It works! {{project.name}} is up and running.
3030
4. Commit your changes: `git commit -a`
3131
5. Publish your project to GitHub: `git add git remote add origin https://github.com/user/repo.git && git push`
3232
6. Deploy the project: `hlx deploy`
33-
7. Make it visible to the world: `hlx publish`
33+
7. Make it visible to the world: `hlx publish`
34+
35+
> [!NOTE]
36+
> This is intended to break.

0 commit comments

Comments
 (0)