fix(export/markdown): proper language tag for Nginx

This commit is contained in:
Elian Doran
2025-03-11 21:05:55 +02:00
parent 09c081fdcf
commit 8c71e6aa90
3 changed files with 30 additions and 33 deletions

View File

@@ -30,8 +30,11 @@
* @param strings
* @returns
*/
export function trimIndentation(strings: TemplateStringsArray) {
const str = strings.toString();
export function trimIndentation(strings: TemplateStringsArray, ...values: any[]) {
// Combine the strings with the values using interpolation
let str = strings.reduce((acc, curr, index) => {
return acc + curr + (values[index] !== undefined ? values[index] : '');
}, '');
// Count the number of spaces on the first line.
let numSpaces = 0;