@@ -193,52 +193,53 @@ export default (options) =>
193
193
194
194
break ;
195
195
}
196
- case 'include' : {
197
- let source ;
198
-
199
- // eslint-disable-next-line no-underscore-dangle
200
- if ( parser . _tokenizer . _state === 4 ) {
201
- return ;
202
- }
203
-
204
- try {
205
- source = parseSrc ( value ) ;
206
- } catch ( error ) {
207
- options . errors . push (
208
- new HtmlSourceError (
209
- `Bad value for attribute "${ attribute } " on element "${ tag } ": ${ error . message } ` ,
210
- parser . startIndex ,
211
- parser . endIndex ,
212
- html
213
- )
214
- ) ;
215
-
216
- return ;
217
- }
218
-
219
- if ( ! urlFilter ( attribute , source . value , resourcePath ) ) {
220
- return ;
221
- }
222
-
223
- const { startIndex } = parser ;
224
- const closingTag = html
225
- . slice ( startIndex - 1 )
226
- . match (
227
- new RegExp ( `<s*${ tag } [^>]*>(?:.*?)</${ tag } [^<>]*>` , 's' )
228
- ) ;
229
-
230
- if ( ! closingTag ) {
231
- return ;
232
- }
233
-
234
- const endIndex = startIndex + closingTag [ 0 ] . length ;
235
- const importItem = getImportItem ( source . value ) ;
236
- const replacementItem = getReplacementItem ( importItem ) ;
237
-
238
- sources . push ( { replacementItem, startIndex, endIndex } ) ;
239
-
240
- break ;
241
- }
196
+ // Need improve
197
+ // case 'include': {
198
+ // let source;
199
+ //
200
+ // // eslint-disable-next-line no-underscore-dangle
201
+ // if (parser._tokenizer._state === 4) {
202
+ // return;
203
+ // }
204
+ //
205
+ // try {
206
+ // source = parseSrc(value);
207
+ // } catch (error) {
208
+ // options.errors.push(
209
+ // new HtmlSourceError(
210
+ // `Bad value for attribute "${attribute}" on element "${tag}": ${error.message}`,
211
+ // parser.startIndex,
212
+ // parser.endIndex,
213
+ // html
214
+ // )
215
+ // );
216
+ //
217
+ // return;
218
+ // }
219
+ //
220
+ // if (!urlFilter(attribute, source.value, resourcePath)) {
221
+ // return;
222
+ // }
223
+ //
224
+ // const { startIndex } = parser;
225
+ // const closingTag = html
226
+ // .slice(startIndex - 1)
227
+ // .match(
228
+ // new RegExp(`<s*${tag}[^>]*>(?:.*?)</${tag}[^<>]*>`, 's')
229
+ // );
230
+ //
231
+ // if (!closingTag) {
232
+ // return;
233
+ // }
234
+ //
235
+ // const endIndex = startIndex + closingTag[0].length;
236
+ // const importItem = getImportItem(source.value);
237
+ // const replacementItem = getReplacementItem(importItem);
238
+ //
239
+ // sources.push({ replacementItem, startIndex, endIndex });
240
+ //
241
+ // break;
242
+ // }
242
243
}
243
244
} ) ;
244
245
0 commit comments