File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change 88 */
99
1010/**
11- * fixes identation by removing leading spaces from each line
11+ * fixes indentation by removing leading spaces from each line
1212 */
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
1515 return str
16- . replace ( RegExp ( '^' + indent , 'mg' ) , '' ) // remove ident
16+ . replace ( RegExp ( '^' + indent , 'mg' ) , '' ) // remove indent
1717 . replace ( / ^ \n * / m, '' ) // remove leading newline
1818 . replace ( / * $ / , '' ) ; // remove trailing spaces
1919}
2020
2121/**
22- * An ES6 string tag that fixes identation . Also removes leading newlines
22+ * An ES6 string tag that fixes indentation . Also removes leading newlines
2323 * but keeps trailing ones
2424 *
2525 * Example usage:
@@ -45,5 +45,5 @@ export default function dedent(
4545 }
4646 }
4747
48- return fixIdent ( res ) ;
48+ return fixIndent ( res ) ;
4949}
You can’t perform that action at this time.
0 commit comments