File tree 1 file changed +6
-6
lines changed
1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change 8
8
*/
9
9
10
10
/**
11
- * fixes identation by removing leading spaces from each line
11
+ * fixes indentation by removing leading spaces from each line
12
12
*/
13
- function fixIdent ( str : string ) : string {
14
- const indent = / ^ \n ? ( * ) / . exec ( str ) [ 1 ] ; // figure out ident
13
+ function fixIndent ( str : string ) : string {
14
+ const indent = / ^ \n ? ( * ) / . exec ( str ) [ 1 ] ; // figure out indent
15
15
return str
16
- . replace ( RegExp ( '^' + indent , 'mg' ) , '' ) // remove ident
16
+ . replace ( RegExp ( '^' + indent , 'mg' ) , '' ) // remove indent
17
17
. replace ( / ^ \n * / m, '' ) // remove leading newline
18
18
. replace ( / * $ / , '' ) ; // remove trailing spaces
19
19
}
20
20
21
21
/**
22
- * An ES6 string tag that fixes identation . Also removes leading newlines
22
+ * An ES6 string tag that fixes indentation . Also removes leading newlines
23
23
* but keeps trailing ones
24
24
*
25
25
* Example usage:
@@ -45,5 +45,5 @@ export default function dedent(
45
45
}
46
46
}
47
47
48
- return fixIdent ( res ) ;
48
+ return fixIndent ( res ) ;
49
49
}
You can’t perform that action at this time.
0 commit comments