@@ -60,8 +60,7 @@ var _ = _self.Prism = {
60
60
return clone ;
61
61
62
62
case 'Array' :
63
- // Check for existence for IE8
64
- return o . map && o . map ( function ( v ) { return _ . util . clone ( v ) ; } ) ;
63
+ return o . map ( function ( v ) { return _ . util . clone ( v ) ; } ) ;
65
64
}
66
65
67
66
return o ;
@@ -507,7 +506,7 @@ Token.stringify = function(o, language, parent) {
507
506
// if (script) {
508
507
// _.filename = script.src;
509
508
510
- // if (document.addEventListener && !_.manual && !script.hasAttribute('data-manual')) {
509
+ // if (!_.manual && !script.hasAttribute('data-manual')) {
511
510
// if(document.readyState !== "loading") {
512
511
// if (window.requestAnimationFrame) {
513
512
// window.requestAnimationFrame(_.highlightAll);
@@ -638,7 +637,7 @@ if (Prism.languages.markup) {
638
637
Prism . languages . clike = {
639
638
'comment' : [
640
639
{
641
- pattern : / ( ^ | [ ^ \\ ] ) \/ \* [ \s \S ] * ?\* \/ / ,
640
+ pattern : / ( ^ | [ ^ \\ ] ) \/ \* [ \s \S ] * ?(?: \* \/ | $ ) / ,
642
641
lookbehind : true
643
642
} ,
644
643
{
@@ -715,7 +714,7 @@ if (Prism.languages.markup) {
715
714
Prism . languages . js = Prism . languages . javascript ;
716
715
717
716
Prism . languages . c = Prism . languages . extend ( 'clike' , {
718
- 'keyword' : / \b ( a s m | t y p e o f | i n l i n e | a u t o | b r e a k | c a s e | c h a r | c o n s t | c o n t i n u e | d e f a u l t | d o | d o u b l e | e l s e | e n u m | e x t e r n | f l o a t | f o r | g o t o | i f | i n t | l o n g | r e g i s t e r | r e t u r n | s h o r t | s i g n e d | s i z e o f | s t a t i c | s t r u c t | s w i t c h | t y p e d e f | u n i o n | u n s i g n e d | v o i d | v o l a t i l e | w h i l e ) \b / ,
717
+ 'keyword' : / \b ( _ A l i g n a s | _ A l i g n o f | _ A t o m i c | _ B o o l | _ C o m p l e x | _ G e n e r i c | _ I m a g i n a r y | _ N o r e t u r n | _ S t a t i c _ a s s e r t | _ T h r e a d _ l o c a l | a s m | t y p e o f | i n l i n e | a u t o | b r e a k | c a s e | c h a r | c o n s t | c o n t i n u e | d e f a u l t | d o | d o u b l e | e l s e | e n u m | e x t e r n | f l o a t | f o r | g o t o | i f | i n t | l o n g | r e g i s t e r | r e t u r n | s h o r t | s i g n e d | s i z e o f | s t a t i c | s t r u c t | s w i t c h | t y p e d e f | u n i o n | u n s i g n e d | v o i d | v o l a t i l e | w h i l e ) \b / ,
719
718
'operator' : / \- [ > - ] ? | \+ \+ ? | ! = ? | < < ? = ? | > > ? = ? | = = ? | & & ? | \| ? \| | [ ~ ^ % ? * \/ ] / ,
720
719
'number' : / \b - ? (?: 0 x [ \d a - f ] + | \d * \. ? \d + (?: e [ + - ] ? \d + ) ? ) [ f u l ] * \b / i
721
720
} ) ;
@@ -735,14 +734,14 @@ Prism.languages.insertBefore('c', 'string', {
735
734
} ,
736
735
// highlight macro directives as keywords
737
736
'directive' : {
738
- pattern : / ( # \s * ) \b ( d e f i n e | e l i f | e l s e | e n d i f | e r r o r | i f d e f | i f n d e f | i f | i m p o r t | i n c l u d e | l i n e | p r a g m a | u n d e f | u s i n g ) \b / ,
737
+ pattern : / ( # \s * ) \b ( d e f i n e | d e f i n e d | e l i f | e l s e | e n d i f | e r r o r | i f d e f | i f n d e f | i f | i m p o r t | i n c l u d e | l i n e | p r a g m a | u n d e f | u s i n g ) \b / ,
739
738
lookbehind : true ,
740
739
alias : 'keyword'
741
740
}
742
741
}
743
742
} ,
744
743
// highlight predefined macros as constants
745
- 'constant' : / \b ( _ _ F I L E _ _ | _ _ L I N E _ _ | _ _ D A T E _ _ | _ _ T I M E _ _ | _ _ T I M E S T A M P _ _ | _ _ f u n c _ _ | E O F | N U L L | s t d i n | s t d o u t | s t d e r r ) \b /
744
+ 'constant' : / \b ( _ _ F I L E _ _ | _ _ L I N E _ _ | _ _ D A T E _ _ | _ _ T I M E _ _ | _ _ T I M E S T A M P _ _ | _ _ f u n c _ _ | E O F | N U L L | S E E K _ C U R | S E E K _ E N D | S E E K _ S E T | s t d i n | s t d o u t | s t d e r r ) \b /
746
745
} ) ;
747
746
748
747
delete Prism . languages . c [ 'class-name' ] ;
0 commit comments