Skip to content

Commit ccdbcdb

Browse files
committed
fix spelling of puctuation
1 parent 4005509 commit ccdbcdb

File tree

3 files changed

+11
-9
lines changed

3 files changed

+11
-9
lines changed

projects/ngx-json-treeview/src/lib/ngx-json-treeview.component.html

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
</section>
1212
} @else {
1313
@if (_currentDepth() === 0) {
14-
<span class="puctuation">{{ openingBrace() }}</span>
14+
<span class="punctuation">{{ openingBrace() }}</span>
1515
}
1616
@for (
1717
segment of segments();
@@ -37,10 +37,10 @@
3737
}
3838
<span class="segment-key">{{ `"${segment.key}"` }}</span>
3939
</span>
40-
<span class="puctuation">: </span>
40+
<span class="punctuation">: </span>
4141
@if (empty) {
4242
<span
43-
class="puctuation"
43+
class="punctuation"
4444
>{{ `${openingBrace}${closingBrace}${i < len - 1 ? ',' : ''}` }}</span
4545
>
4646
} @else if (!expandable || !segment.expanded) {
@@ -53,10 +53,10 @@
5353
(keydown.enter)="onValueClickHandler(segment)"
5454
>{{ segment.description }}</span
5555
>
56-
<span class="puctuation">{{ i < len - 1 ? ',' : '' }}</span>
56+
<span class="punctuation">{{ i < len - 1 ? ',' : '' }}</span>
5757
} @else {
5858
@if (openingBrace) {
59-
<span class="puctuation">
59+
<span class="punctuation">
6060
{{ openingBrace }}
6161
</span>
6262
}
@@ -74,7 +74,7 @@
7474
[_currentDepth]="_currentDepth() + 1"
7575
(onValueClick)="onValueClickHandler($event)" />
7676
@if (closingBrace) {
77-
<span class="puctuation"
77+
<span class="punctuation"
7878
>{{ closingBrace }}{{ i < len - 1 ? ',' : '' }}</span
7979
>
8080
}
@@ -83,7 +83,7 @@
8383
</section>
8484
}
8585
@if (_currentDepth() === 0) {
86-
<span class="puctuation">{{ closingBrace() }}</span>
86+
<span class="punctuation">{{ closingBrace() }}</span>
8787
}
8888
}
8989
</section>

projects/ngx-json-treeview/src/lib/ngx-json-treeview.component.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ $type-colors: (
100100
}
101101
}
102102

103-
.puctuation {
103+
.punctuation {
104104
color: var(--ngx-json-punctuation, #000);
105105
}
106106

projects/ngx-json-treeview/src/lib/ngx-json-treeview.component.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,9 @@ export class NgxJsonTreeviewComponent {
142142
return ']';
143143
} else return '}';
144144
});
145-
asString = computed<string>(() => JSON.stringify(this.json(), null, 2));
145+
asString = computed<string>(() =>
146+
JSON.stringify(this.json(), null, 2).trim()
147+
);
146148

147149
isExpandable(segment: Segment) {
148150
return (

0 commit comments

Comments
 (0)