@@ -14,11 +14,11 @@ const parseCode = (content) => {
14
14
15
15
return content
16
16
// Remove the all "/* start:skip-in-preview */" and "/* end:skip-in-preview */" comments
17
- . replace ( / \/ \* ( \s + ) ? ( s t a r t | e n d ) : s k i p - i n - p r e v i e w ( \s + ) ? \* \/ \n / gm, '' )
17
+ . replace ( / \/ \* ( \s + ) ? ( s t a r t | e n d ) : s k i p - i n - p r e v i e w ( \s + ) ? \* \/ \r ? \ n/ gm, '' )
18
18
// Remove the all "/* start:skip-in-sandbox */" and "/* end:skip-in-sandbox */" comments
19
- . replace ( / \/ \* ( \s + ) ? ( s t a r t | e n d ) : s k i p - i n - s a n d b o x ( \s + ) ? \* \/ \n / gm, '' )
19
+ . replace ( / \/ \* ( \s + ) ? ( s t a r t | e n d ) : s k i p - i n - s a n d b o x ( \s + ) ? \* \/ \r ? \ n/ gm, '' )
20
20
// Remove the code between "/* start:skip-in-compilation */" and "/* end:skip-in-compilation */" expressions
21
- . replace ( / \/ \* ( \s + ) ? s t a r t : s k i p - i n - c o m p i l a t i o n ( \s + ) ? \* \/ \n .* ?\/ \* ( \s + ) ? e n d : s k i p - i n - c o m p i l a t i o n ( \s + ) ? \* \/ \n / msg, '' )
21
+ . replace ( / \/ \* ( \s + ) ? s t a r t : s k i p - i n - c o m p i l a t i o n ( \s + ) ? \* \/ \r ? \ n .* ?\/ \* ( \s + ) ? e n d : s k i p - i n - c o m p i l a t i o n ( \s + ) ? \* \/ \r ? \n / msg, '' )
22
22
// Remove /* end-file */
23
23
. replace ( / \/ \* e n d - f i l e \* \/ / gm, '' ) ;
24
24
} ;
@@ -28,11 +28,11 @@ const parseCodeSandbox = (content) => {
28
28
29
29
return content
30
30
// Remove the code between "/* start:skip-in-sandbox */" and "/* end:skip-in-sandbox */" expressions
31
- . replace ( / \/ \* ( \s + ) ? s t a r t : s k i p - i n - s a n d b o x ( \s + ) ? \* \/ \n .* ?\/ \* ( \s + ) ? e n d : s k i p - i n - s a n d b o x ( \s + ) ? \* \/ \n / msg, '' )
31
+ . replace ( / \/ \* ( \s + ) ? s t a r t : s k i p - i n - s a n d b o x ( \s + ) ? \* \/ \r ? \ n .* ?\/ \* ( \s + ) ? e n d : s k i p - i n - s a n d b o x ( \s + ) ? \* \/ \r ? \n / msg, '' )
32
32
// Remove the all "/* start:skip-in-preview */" and "/* end:skip-in-preview */" comments
33
- . replace ( / \/ \* ( \s + ) ? ( s t a r t | e n d ) : s k i p - i n - p r e v i e w ( \s + ) ? \* \/ \n / gm, '' )
33
+ . replace ( / \/ \* ( \s + ) ? ( s t a r t | e n d ) : s k i p - i n - p r e v i e w ( \s + ) ? \* \/ \r ? \ n/ gm, '' )
34
34
// Remove the all "/* start:skip-in-compilation */" and "/* end:skip-in-compilation */" comments
35
- . replace ( / \/ \* ( \s + ) ? ( s t a r t | e n d ) : s k i p - i n - c o m p i l a t i o n ( \s + ) ? \* \/ \n / gm, '' ) ;
35
+ . replace ( / \/ \* ( \s + ) ? ( s t a r t | e n d ) : s k i p - i n - c o m p i l a t i o n ( \s + ) ? \* \/ \r ? \ n/ gm, '' ) ;
36
36
} ;
37
37
38
38
module . exports = function ( ) {
0 commit comments