Skip to content

Commit

Permalink
♻️ REFACTOR: target -> mystTarget, comment -> mystComment (#40)
Browse files Browse the repository at this point in the history
Also removes identifier from target node, identifier is resolved when
target propagates to subsequent node
  • Loading branch information
fwkoch authored Apr 11, 2022
1 parent bb3abe8 commit e473743
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 19 deletions.
6 changes: 3 additions & 3 deletions docs/examples/comments.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ cases:
mdast:
type: root
children:
- type: comment
- type: mystComment
value: A comment
myst: |-
% A comment
Expand All @@ -18,7 +18,7 @@ cases:
children:
- type: text
value: Something
- type: comment
- type: mystComment
value: A comment
- type: paragraph
children:
Expand All @@ -39,7 +39,7 @@ cases:
children:
- type: text
value: Something
- type: comment
- type: mystComment
value: A comment --> <script>
- type: paragraph
children:
Expand Down
12 changes: 4 additions & 8 deletions docs/examples/references.headings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@ cases:
kind: ref
identifier: my_id
label: my_id
- type: target
identifier: my_id
- type: mystTarget
label: my_id
- type: heading
depth: 1
Expand Down Expand Up @@ -54,8 +53,7 @@ cases:
children:
- type: text
value: something...
- type: target
identifier: my_id
- type: mystTarget
label: my_id
- type: heading
depth: 1
Expand All @@ -81,8 +79,7 @@ cases:
- type: link
url: my_id
children: []
- type: target
identifier: my_id
- type: mystTarget
label: my_id
- type: heading
depth: 1
Expand Down Expand Up @@ -115,8 +112,7 @@ cases:
children:
- type: text
value: something...
- type: target
identifier: my_id
- type: mystTarget
label: my_id
- type: heading
depth: 1
Expand Down
3 changes: 1 addition & 2 deletions docs/examples/references.target.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ cases:
mdast:
type: root
children:
- type: target
identifier: my_id
- type: mystTarget
label: my_ID
- type: heading
depth: 1
Expand Down
2 changes: 1 addition & 1 deletion schema/comments.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
{
"properties": {
"type": {
"const": "comment"
"const": "mystComment"
},
"value": {},
"position": {},
Expand Down
11 changes: 6 additions & 5 deletions schema/references.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,18 @@
{
"properties": {
"type": {
"const": "target"
"const": "mystTarget"
},
"label": {
"description": "unresolved target label",
"type": "string"
},
"identifier": {},
"label": {},
"position": {},
"data": {}
},
"additionalProperties": false
},
{ "$ref": "unist.schema.json#/$defs/Node" },
{ "$ref": "commonmark.schema.json#/$defs/Association" }
{ "$ref": "unist.schema.json#/$defs/Node" }
]
},
"CrossReference": {
Expand Down

0 comments on commit e473743

Please sign in to comment.