Skip to content

Commit 21a4d93

Browse files
authored
Remove leading indentation from README code snippets. (#984)
Leading indentation inside fenced code blocks appears inside the rendered code blocks, rather than being removed like in 4-space-indented code blocks.
1 parent 77c6559 commit 21a4d93

File tree

1 file changed

+18
-18
lines changed

1 file changed

+18
-18
lines changed

README.md

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -28,32 +28,32 @@ and renders declaratively using `lit-html`. See the [lit-html guide](https://lit
2828
for additional information on how to create templates for lit-element.
2929

3030
```ts
31-
import {LitElement, html, css, customElement, property} from 'lit-element';
31+
import {LitElement, html, css, customElement, property} from 'lit-element';
3232

33-
// This decorator defines the element.
34-
@customElement('my-element')
35-
export class MyElement extends LitElement {
33+
// This decorator defines the element.
34+
@customElement('my-element')
35+
export class MyElement extends LitElement {
3636

37-
// This decorator creates a property accessor that triggers rendering and
38-
// an observed attribute.
39-
@property()
40-
mood = 'great';
37+
// This decorator creates a property accessor that triggers rendering and
38+
// an observed attribute.
39+
@property()
40+
mood = 'great';
4141

42-
static styles = css`
43-
span {
44-
color: green;
45-
}`;
42+
static styles = css`
43+
span {
44+
color: green;
45+
}`;
4646

47-
// Render element DOM by returning a `lit-html` template.
48-
render() {
49-
return html`Web Components are <span>${this.mood}</span>!`;
50-
}
47+
// Render element DOM by returning a `lit-html` template.
48+
render() {
49+
return html`Web Components are <span>${this.mood}</span>!`;
50+
}
5151

52-
}
52+
}
5353
```
5454

5555
```html
56-
<my-element mood="awesome"></my-element>
56+
<my-element mood="awesome"></my-element>
5757
```
5858

5959
Note, this example uses decorators to create properties. Decorators are a proposed

0 commit comments

Comments
 (0)