@@ -12,7 +12,7 @@ export interface HyperLinkState {
12
12
13
13
class HyperLink extends WidgetType {
14
14
private readonly state : HyperLinkState ;
15
- constructor ( { ... state } : HyperLinkState ) {
15
+ constructor ( state : HyperLinkState ) {
16
16
super ( ) ;
17
17
this . state = state ;
18
18
}
@@ -40,7 +40,7 @@ function hyperLinkDecorations(view: EditorView) {
40
40
syntaxTree ( view . state ) . iterate ( {
41
41
from : range . from ,
42
42
to : range . to ,
43
- enter : ( { type, node , from, to } ) => {
43
+ enter : ( { type, from, to } ) => {
44
44
const callExp : string = view . state . doc . sliceString ( from , to ) ;
45
45
if ( type . name === 'URL' ) {
46
46
const widget = Decoration . widget ( {
@@ -52,12 +52,6 @@ function hyperLinkDecorations(view: EditorView) {
52
52
side : 1 ,
53
53
} ) ;
54
54
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 ) ;
61
55
}
62
56
} ,
63
57
} ) ;
0 commit comments