1
0
Fork 0

chore: Linting for markdown and js

This commit is contained in:
joostdecock 2021-10-17 17:34:55 +02:00
parent eca8199ed8
commit 1c92e0f655
6677 changed files with 24391 additions and 25987 deletions

View file

@ -1,6 +1,6 @@
---
title: add()
---
***
## title: add()
```js
Attributes attributes.add(string key, string value)
@ -8,7 +8,7 @@ Attributes attributes.add(string key, string value)
Adds `value` to the attribute identified by `key`.
Adding multiple values to the same key will result in them being joined together
Adding multiple values to the same key will result in them being joined together
(with a space) when rendering.
```js
@ -28,4 +28,3 @@ paths.demo = new Path()
paths.demo = new Path()
.attr('class', 'classA classB');
```

View file

@ -1,6 +1,6 @@
---
title: clone()
---
***
## title: clone()
```js
Attributes attributes.clone()
@ -17,4 +17,3 @@ paths.demo = new Path()
paths.clone = paths.demo.clone()
```

View file

@ -1,12 +1,13 @@
---
***
title: Attributes
order: 40
---
---------
Attributes is an object that holds attributes for a variety of other objects.
Attributes are attached to [`Point`](/reference/api/point), [`Path`](/reference/api/path), and [`Snippet`](/reference/api/snippet) objects,
as well as the internal [`Svg`](/reference/api/svg) object.
as well as the internal [`Svg`](/reference/api/svg) object.
All of these have an instantiated Attributes object in their `attributes` property.

View file

@ -1,6 +1,6 @@
---
title: get()
---
***
## title: get()
```js
string attributes.get(string key)

View file

@ -1,6 +1,6 @@
---
title: getAsArray()
---
***
## title: getAsArray()
```js
array attributes.getAsArray(string key)
@ -18,4 +18,3 @@ paths.demo = new Path()
let class = paths.demo.attributes.getAsArray('class');
// class now holds: ["classA", "classB"]
```

View file

@ -1,6 +1,6 @@
---
title: remove()
---
***
## title: remove()
```js
Attributes attributes.remove(string key)

View file

@ -1,6 +1,6 @@
---
title: set()
---
***
## title: set()
```js
Attributes attributes.set(string key, string value)