File tree Expand file tree Collapse file tree 1 file changed +16
-7
lines changed
Expand file tree Collapse file tree 1 file changed +16
-7
lines changed Original file line number Diff line number Diff line change 101101 }
102102 replaceToken = true ;
103103 }
104- for ( var i = 0 ; i < atValues . length ; ++ i ) if ( ! prefix || matches ( atValues [ i ] , prefix , matchInMiddle ) )
105- result . push ( quote + atValues [ i ] + quote ) ;
104+ function returnHintsFromAtValues ( atValues ) {
105+ if ( atValues )
106+ for ( var i = 0 ; i < atValues . length ; ++ i ) if ( ! prefix || matches ( atValues [ i ] , prefix , matchInMiddle ) )
107+ result . push ( quote + atValues [ i ] + quote ) ;
108+ return returnHints ( ) ;
109+ }
110+ if ( atValues && atValues . then ) return atValues . then ( returnHintsFromAtValues ) ;
111+ return returnHintsFromAtValues ( atValues ) ;
106112 } else { // An attribute name
107113 if ( token . type == "attribute" ) {
108114 prefix = token . string ;
112118 result . push ( attr ) ;
113119 }
114120 }
115- return {
116- list : result ,
117- from : replaceToken ? Pos ( cur . line , tagStart == null ? token . start : tagStart ) : cur ,
118- to : replaceToken ? Pos ( cur . line , token . end ) : cur
119- } ;
121+ function returnHints ( ) {
122+ return {
123+ list : result ,
124+ from : replaceToken ? Pos ( cur . line , tagStart == null ? token . start : tagStart ) : cur ,
125+ to : replaceToken ? Pos ( cur . line , token . end ) : cur
126+ } ;
127+ }
128+ return returnHints ( ) ;
120129 }
121130
122131 CodeMirror . registerHelper ( "hint" , "xml" , getHints ) ;
You can’t perform that action at this time.
0 commit comments