* Indents the text content with the amount of specified spaces. The spaces will be added after * every line-break. This utility function can be used inside of EJS templates to properly * include the additional files.
(text: string, numSpaces: number)
| 138 | * include the additional files. |
| 139 | */ |
| 140 | function indentTextContent(text: string, numSpaces: number): string { |
| 141 | // In the Material project there should be only LF line-endings, but the schematic files |
| 142 | // are not being linted and therefore there can be also CRLF or just CR line-endings. |
| 143 | return text.replace(/(\r\n|\r|\n)/g, `$1${' '.repeat(numSpaces)}`); |
| 144 | } |
| 145 | |
| 146 | /** |
| 147 | * Rule that copies and interpolates the files that belong to this schematic context. Additionally |
nothing calls this directly
no outgoing calls
no test coverage detected