Skip to content

Commit 6a8b401

Browse files
authored
fix: unnecessary console.log (#385)
1 parent a84030f commit 6a8b401

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

extensions/hyper-link/src/index.ts

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export interface HyperLinkState {
1212

1313
class HyperLink extends WidgetType {
1414
private readonly state: HyperLinkState;
15-
constructor({ ...state }: HyperLinkState) {
15+
constructor(state: HyperLinkState) {
1616
super();
1717
this.state = state;
1818
}
@@ -40,7 +40,7 @@ function hyperLinkDecorations(view: EditorView) {
4040
syntaxTree(view.state).iterate({
4141
from: range.from,
4242
to: range.to,
43-
enter: ({ type, node, from, to }) => {
43+
enter: ({ type, from, to }) => {
4444
const callExp: string = view.state.doc.sliceString(from, to);
4545
if (type.name === 'URL') {
4646
const widget = Decoration.widget({
@@ -52,12 +52,6 @@ function hyperLinkDecorations(view: EditorView) {
5252
side: 1,
5353
});
5454
widgets.push(widget.range(to));
55-
} else if (type.name === 'String') {
56-
console.log('type.name:', type.name, callExp);
57-
} else if (type.name === 'CodeText') {
58-
console.log('type.name:', type.name, callExp);
59-
} else {
60-
console.log('type.name:', type.name, callExp);
6155
}
6256
},
6357
});

0 commit comments

Comments
 (0)