Skip to content

Commit

Permalink
Rename link, src, and href properties to url
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
wooorm committed Feb 6, 2016
1 parent fbf003a commit 94fd6d4
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -602,7 +602,7 @@ Yields:
interface Link <: Parent {
type: "link";
title: string | null;
href: string;
url: string;
}
```

Expand All @@ -618,7 +618,7 @@ Yields:
{
"type": "link",
"title": "bravo",
"href": "http://example.com",
"url": "http://example.com",
"children": [{
"type": "text",
"value": "alpha"
Expand All @@ -635,7 +635,7 @@ interface Image <: Node {
type: "image";
title: string | null;
alt: string | null;
src: string;
url: string;
}
```

Expand All @@ -651,7 +651,7 @@ Yields:
{
"type": "link",
"title": "bravo",
"src": "http://example.com",
"url": "http://example.com",
"alt": "alpha"
}
```
Expand Down Expand Up @@ -688,7 +688,7 @@ Yields:
### `LinkReference`

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

`referenceType` is needed to detect if a reference was meant as a
Expand Down Expand Up @@ -731,7 +731,7 @@ Yields:
### `ImageReference`

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

`referenceType` is needed to detect if a reference was meant as a
Expand Down Expand Up @@ -803,7 +803,7 @@ interface Definition <: Node {
type: "definition";
identifier: string;
title: string | null;
link: string;
url: string;
}
```

Expand All @@ -820,7 +820,7 @@ Yields:
"type": "definition",
"identifier": "alpha",
"title": null,
"link": "http://example.com"
"url": "http://example.com"
}
```

Expand Down

0 comments on commit 94fd6d4

Please sign in to comment.