218 (r'\s+', Text), |
218 (r'\s+', Text), |
219 (r'[\w.:-]+\s*=', Name.Attribute, 'attr'), |
219 (r'[\w.:-]+\s*=', Name.Attribute, 'attr'), |
220 (r'/?\s*>', Name.Tag, '#pop'), |
220 (r'/?\s*>', Name.Tag, '#pop'), |
221 ], |
221 ], |
222 'attr': [ |
222 'attr': [ |
223 ('\s+', Text), |
223 (r'\s+', Text), |
224 ('".*?"', String, '#pop'), |
224 ('".*?"', String, '#pop'), |
225 ("'.*?'", String, '#pop'), |
225 ("'.*?'", String, '#pop'), |
226 (r'[^\s>]+', String, '#pop'), |
226 (r'[^\s>]+', String, '#pop'), |
227 ], |
227 ], |
228 } |
228 } |
311 |
311 |
312 'content': [ |
312 'content': [ |
313 include('css'), |
313 include('css'), |
314 (r'%[\w:-]+', Name.Tag, 'tag'), |
314 (r'%[\w:-]+', Name.Tag, 'tag'), |
315 (r'!!!' + _dot + r'*\n', Name.Namespace, '#pop'), |
315 (r'!!!' + _dot + r'*\n', Name.Namespace, '#pop'), |
316 (r'(/)(\[' + _dot + '*?\])(' + _dot + r'*\n)', |
316 (r'(/)(\[' + _dot + r'*?\])(' + _dot + r'*\n)', |
317 bygroups(Comment, Comment.Special, Comment), |
317 bygroups(Comment, Comment.Special, Comment), |
318 '#pop'), |
318 '#pop'), |
319 (r'/' + _dot + r'*\n', _starts_block(Comment, 'html-comment-block'), |
319 (r'/' + _dot + r'*\n', _starts_block(Comment, 'html-comment-block'), |
320 '#pop'), |
320 '#pop'), |
321 (r'-#' + _dot + r'*\n', _starts_block(Comment.Preproc, |
321 (r'-#' + _dot + r'*\n', _starts_block(Comment.Preproc, |
328 include('eval-or-plain'), |
328 include('eval-or-plain'), |
329 ], |
329 ], |
330 |
330 |
331 'tag': [ |
331 'tag': [ |
332 include('css'), |
332 include('css'), |
333 (r'\{(,\n|' + _dot + ')*?\}', using(RubyLexer)), |
333 (r'\{(,\n|' + _dot + r')*?\}', using(RubyLexer)), |
334 (r'\[' + _dot + '*?\]', using(RubyLexer)), |
334 (r'\[' + _dot + r'*?\]', using(RubyLexer)), |
335 (r'\(', Text, 'html-attributes'), |
335 (r'\(', Text, 'html-attributes'), |
336 (r'/[ \t]*\n', Punctuation, '#pop:2'), |
336 (r'/[ \t]*\n', Punctuation, '#pop:2'), |
337 (r'[<>]{1,2}(?=[ \t=])', Punctuation), |
337 (r'[<>]{1,2}(?=[ \t=])', Punctuation), |
338 include('eval-or-plain'), |
338 include('eval-or-plain'), |
339 ], |
339 ], |
340 |
340 |
341 'plain': [ |
341 'plain': [ |
342 (r'([^#\n]|#[^{\n]|(\\\\)*\\#\{)+', Text), |
342 (r'([^#\n]|#[^{\n]|(\\\\)*\\#\{)+', Text), |
343 (r'(#\{)(' + _dot + '*?)(\})', |
343 (r'(#\{)(' + _dot + r'*?)(\})', |
344 bygroups(String.Interpol, using(RubyLexer), String.Interpol)), |
344 bygroups(String.Interpol, using(RubyLexer), String.Interpol)), |
345 (r'\n', Text, 'root'), |
345 (r'\n', Text, 'root'), |
346 ], |
346 ], |
347 |
347 |
348 'html-attributes': [ |
348 'html-attributes': [ |
371 (r'\n', Text, 'root'), |
371 (r'\n', Text, 'root'), |
372 ], |
372 ], |
373 |
373 |
374 'filter-block': [ |
374 'filter-block': [ |
375 (r'([^#\n]|#[^{\n]|(\\\\)*\\#\{)+', Name.Decorator), |
375 (r'([^#\n]|#[^{\n]|(\\\\)*\\#\{)+', Name.Decorator), |
376 (r'(#\{)(' + _dot + '*?)(\})', |
376 (r'(#\{)(' + _dot + r'*?)(\})', |
377 bygroups(String.Interpol, using(RubyLexer), String.Interpol)), |
377 bygroups(String.Interpol, using(RubyLexer), String.Interpol)), |
378 (r'\n', Text, 'root'), |
378 (r'\n', Text, 'root'), |
379 ], |
379 ], |
380 } |
380 } |
381 |
381 |
420 |
420 |
421 'content': [ |
421 'content': [ |
422 include('css'), |
422 include('css'), |
423 (r'%[\w:-]+', Name.Tag, 'tag'), |
423 (r'%[\w:-]+', Name.Tag, 'tag'), |
424 (r'!!!' + _dot + r'*\n', Name.Namespace, '#pop'), |
424 (r'!!!' + _dot + r'*\n', Name.Namespace, '#pop'), |
425 (r'(/)(\[' + _dot + '*?\])(' + _dot + r'*\n)', |
425 (r'(/)(\[' + _dot + r'*?\])(' + _dot + r'*\n)', |
426 bygroups(Comment, Comment.Special, Comment), |
426 bygroups(Comment, Comment.Special, Comment), |
427 '#pop'), |
427 '#pop'), |
428 (r'/' + _dot + r'*\n', _starts_block(Comment, 'html-comment-block'), |
428 (r'/' + _dot + r'*\n', _starts_block(Comment, 'html-comment-block'), |
429 '#pop'), |
429 '#pop'), |
430 (r'-#' + _dot + r'*\n', _starts_block(Comment.Preproc, |
430 (r'-#' + _dot + r'*\n', _starts_block(Comment.Preproc, |
440 include('eval-or-plain'), |
440 include('eval-or-plain'), |
441 ], |
441 ], |
442 |
442 |
443 'tag': [ |
443 'tag': [ |
444 include('css'), |
444 include('css'), |
445 (r'\{(,\n|' + _dot + ')*?\}', using(ScalaLexer)), |
445 (r'\{(,\n|' + _dot + r')*?\}', using(ScalaLexer)), |
446 (r'\[' + _dot + '*?\]', using(ScalaLexer)), |
446 (r'\[' + _dot + r'*?\]', using(ScalaLexer)), |
447 (r'\(', Text, 'html-attributes'), |
447 (r'\(', Text, 'html-attributes'), |
448 (r'/[ \t]*\n', Punctuation, '#pop:2'), |
448 (r'/[ \t]*\n', Punctuation, '#pop:2'), |
449 (r'[<>]{1,2}(?=[ \t=])', Punctuation), |
449 (r'[<>]{1,2}(?=[ \t=])', Punctuation), |
450 include('eval-or-plain'), |
450 include('eval-or-plain'), |
451 ], |
451 ], |
452 |
452 |
453 'plain': [ |
453 'plain': [ |
454 (r'([^#\n]|#[^{\n]|(\\\\)*\\#\{)+', Text), |
454 (r'([^#\n]|#[^{\n]|(\\\\)*\\#\{)+', Text), |
455 (r'(#\{)(' + _dot + '*?)(\})', |
455 (r'(#\{)(' + _dot + r'*?)(\})', |
456 bygroups(String.Interpol, using(ScalaLexer), String.Interpol)), |
456 bygroups(String.Interpol, using(ScalaLexer), String.Interpol)), |
457 (r'\n', Text, 'root'), |
457 (r'\n', Text, 'root'), |
458 ], |
458 ], |
459 |
459 |
460 'html-attributes': [ |
460 'html-attributes': [ |
483 (r'\n', Text, 'root'), |
483 (r'\n', Text, 'root'), |
484 ], |
484 ], |
485 |
485 |
486 'filter-block': [ |
486 'filter-block': [ |
487 (r'([^#\n]|#[^{\n]|(\\\\)*\\#\{)+', Name.Decorator), |
487 (r'([^#\n]|#[^{\n]|(\\\\)*\\#\{)+', Name.Decorator), |
488 (r'(#\{)(' + _dot + '*?)(\})', |
488 (r'(#\{)(' + _dot + r'*?)(\})', |
489 bygroups(String.Interpol, using(ScalaLexer), String.Interpol)), |
489 bygroups(String.Interpol, using(ScalaLexer), String.Interpol)), |
490 (r'\n', Text, 'root'), |
490 (r'\n', Text, 'root'), |
491 ], |
491 ], |
492 } |
492 } |
493 |
493 |
528 ], |
528 ], |
529 |
529 |
530 'content': [ |
530 'content': [ |
531 include('css'), |
531 include('css'), |
532 (r'!!!' + _dot + r'*\n', Name.Namespace, '#pop'), |
532 (r'!!!' + _dot + r'*\n', Name.Namespace, '#pop'), |
533 (r'(/)(\[' + _dot + '*?\])(' + _dot + r'*\n)', |
533 (r'(/)(\[' + _dot + r'*?\])(' + _dot + r'*\n)', |
534 bygroups(Comment, Comment.Special, Comment), |
534 bygroups(Comment, Comment.Special, Comment), |
535 '#pop'), |
535 '#pop'), |
536 (r'/' + _dot + r'*\n', _starts_block(Comment, 'html-comment-block'), |
536 (r'/' + _dot + r'*\n', _starts_block(Comment, 'html-comment-block'), |
537 '#pop'), |
537 '#pop'), |
538 (r'-#' + _dot + r'*\n', _starts_block(Comment.Preproc, |
538 (r'-#' + _dot + r'*\n', _starts_block(Comment.Preproc, |
549 (r'\|', Text, 'eval-or-plain'), |
549 (r'\|', Text, 'eval-or-plain'), |
550 ], |
550 ], |
551 |
551 |
552 'tag': [ |
552 'tag': [ |
553 include('css'), |
553 include('css'), |
554 (r'\{(,\n|' + _dot + ')*?\}', using(ScalaLexer)), |
554 (r'\{(,\n|' + _dot + r')*?\}', using(ScalaLexer)), |
555 (r'\[' + _dot + '*?\]', using(ScalaLexer)), |
555 (r'\[' + _dot + r'*?\]', using(ScalaLexer)), |
556 (r'\(', Text, 'html-attributes'), |
556 (r'\(', Text, 'html-attributes'), |
557 (r'/[ \t]*\n', Punctuation, '#pop:2'), |
557 (r'/[ \t]*\n', Punctuation, '#pop:2'), |
558 (r'[<>]{1,2}(?=[ \t=])', Punctuation), |
558 (r'[<>]{1,2}(?=[ \t=])', Punctuation), |
559 include('eval-or-plain'), |
559 include('eval-or-plain'), |
560 ], |
560 ], |
561 |
561 |
562 'plain': [ |
562 'plain': [ |
563 (r'([^#\n]|#[^{\n]|(\\\\)*\\#\{)+', Text), |
563 (r'([^#\n]|#[^{\n]|(\\\\)*\\#\{)+', Text), |
564 (r'(#\{)(' + _dot + '*?)(\})', |
564 (r'(#\{)(' + _dot + r'*?)(\})', |
565 bygroups(String.Interpol, using(ScalaLexer), String.Interpol)), |
565 bygroups(String.Interpol, using(ScalaLexer), String.Interpol)), |
566 (r'\n', Text, 'root'), |
566 (r'\n', Text, 'root'), |
567 ], |
567 ], |
568 |
568 |
569 'html-attributes': [ |
569 'html-attributes': [ |
592 (r'\n', Text, 'root'), |
592 (r'\n', Text, 'root'), |
593 ], |
593 ], |
594 |
594 |
595 'filter-block': [ |
595 'filter-block': [ |
596 (r'([^#\n]|#[^{\n]|(\\\\)*\\#\{)+', Name.Decorator), |
596 (r'([^#\n]|#[^{\n]|(\\\\)*\\#\{)+', Name.Decorator), |
597 (r'(#\{)(' + _dot + '*?)(\})', |
597 (r'(#\{)(' + _dot + r'*?)(\})', |
598 bygroups(String.Interpol, using(ScalaLexer), String.Interpol)), |
598 bygroups(String.Interpol, using(ScalaLexer), String.Interpol)), |
599 (r'\n', Text, 'root'), |
599 (r'\n', Text, 'root'), |
600 ], |
600 ], |
601 } |
601 } |
602 JadeLexer = PugLexer # compat |
602 JadeLexer = PugLexer # compat |