Skip to content

Commit 94fd6d4

Browse files
committed
Rename link, src, and href properties to url
Several different properties were used in different nodes for a single semantic entity: the URL. This rename changes that to a unified `url` property. * Rename `link` on `definition` nodes to `url`; * Rename `href` on `link` nodes to `url`; * Rename `src` on `image` nodes to `url`. Clsoes GH-8.
1 parent fbf003a commit 94fd6d4

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

Diff for: readme.md

+8-8
Original file line numberDiff line numberDiff line change
@@ -602,7 +602,7 @@ Yields:
602602
interface Link <: Parent {
603603
type: "link";
604604
title: string | null;
605-
href: string;
605+
url: string;
606606
}
607607
```
608608

@@ -618,7 +618,7 @@ Yields:
618618
{
619619
"type": "link",
620620
"title": "bravo",
621-
"href": "http://example.com",
621+
"url": "http://example.com",
622622
"children": [{
623623
"type": "text",
624624
"value": "alpha"
@@ -635,7 +635,7 @@ interface Image <: Node {
635635
type: "image";
636636
title: string | null;
637637
alt: string | null;
638-
src: string;
638+
url: string;
639639
}
640640
```
641641

@@ -651,7 +651,7 @@ Yields:
651651
{
652652
"type": "link",
653653
"title": "bravo",
654-
"src": "http://example.com",
654+
"url": "http://example.com",
655655
"alt": "alpha"
656656
}
657657
```
@@ -688,7 +688,7 @@ Yields:
688688
### `LinkReference`
689689

690690
`LinkReference` ([`Parent`][parent]) represents a humble hyperlink,
691-
its `href` and `title` defined somewhere else in the document by a
691+
its `url` and `title` defined somewhere else in the document by a
692692
[`Definition`][definition].
693693

694694
`referenceType` is needed to detect if a reference was meant as a
@@ -731,7 +731,7 @@ Yields:
731731
### `ImageReference`
732732

733733
`ImageReference` ([`Node`][node]) represents a figurative figure,
734-
its `src` and `title` defined somewhere else in the document by a
734+
its `url` and `title` defined somewhere else in the document by a
735735
[`Definition`][definition].
736736

737737
`referenceType` is needed to detect if a reference was meant as a
@@ -803,7 +803,7 @@ interface Definition <: Node {
803803
type: "definition";
804804
identifier: string;
805805
title: string | null;
806-
link: string;
806+
url: string;
807807
}
808808
```
809809

@@ -820,7 +820,7 @@ Yields:
820820
"type": "definition",
821821
"identifier": "alpha",
822822
"title": null,
823-
"link": "http://example.com"
823+
"url": "http://example.com"
824824
}
825825
```
826826

0 commit comments

Comments
 (0)