Fix indentation

This commit is contained in:
Emmanuel 2024-12-20 21:55:26 +01:00
parent c57cf2cbbb
commit b7398dbd07

View file

@ -1052,26 +1052,26 @@ async function generateSectionTaGitDirectory(
const fileChanged = await writeTextFileIfChanged( const fileChanged = await writeTextFileIfChanged(
path.join(context.targetDir, articleRepositoryRelativeFilePath), path.join(context.targetDir, articleRepositoryRelativeFilePath),
dedent` dedent`
--- ---
${[ ${[
["État", article.META.META_SPEC.META_ARTICLE.ETAT], ["État", article.META.META_SPEC.META_ARTICLE.ETAT],
["Type", article.META.META_SPEC.META_ARTICLE.TYPE], ["Type", article.META.META_SPEC.META_ARTICLE.TYPE],
["Date de début", article.META.META_SPEC.META_ARTICLE.DATE_DEBUT], ["Date de début", article.META.META_SPEC.META_ARTICLE.DATE_DEBUT],
["Date de fin", article.META.META_SPEC.META_ARTICLE.DATE_FIN], ["Date de fin", article.META.META_SPEC.META_ARTICLE.DATE_FIN],
["Identifiant", articleId], ["Identifiant", articleId],
["Ancien identifiant", article.META.META_COMMUN.ANCIEN_ID], ["Ancien identifiant", article.META.META_COMMUN.ANCIEN_ID],
// TODO: Mettre l'URL dans le Git Tricoteuses // TODO: Mettre l'URL dans le Git Tricoteuses
["URL", article.META.META_COMMUN.URL], ["URL", article.META.META_COMMUN.URL],
] ]
.filter(([, value]) => value !== undefined) .filter(([, value]) => value !== undefined)
.map(([key, value]) => `${key}: ${value}`) .map(([key, value]) => `${key}: ${value}`)
.join("\n")} .join("\n")}
--- ---
###### ${articleTitle} ###### ${articleTitle}
${await cleanHtmlFragment(article.BLOC_TEXTUEL?.CONTENU)} ${await cleanHtmlFragment(article.BLOC_TEXTUEL?.CONTENU)}
` + "\n", `,
) )
if (fileChanged) { if (fileChanged) {
await git.add({ await git.add({
@ -1208,26 +1208,26 @@ async function generateTextGitDirectory(
const fileChanged = await writeTextFileIfChanged( const fileChanged = await writeTextFileIfChanged(
path.join(context.targetDir, articleRepositoryRelativeFilePath), path.join(context.targetDir, articleRepositoryRelativeFilePath),
dedent` dedent`
--- ---
${[ ${[
["État", article.META.META_SPEC.META_ARTICLE.ETAT], ["État", article.META.META_SPEC.META_ARTICLE.ETAT],
["Type", article.META.META_SPEC.META_ARTICLE.TYPE], ["Type", article.META.META_SPEC.META_ARTICLE.TYPE],
["Date de début", article.META.META_SPEC.META_ARTICLE.DATE_DEBUT], ["Date de début", article.META.META_SPEC.META_ARTICLE.DATE_DEBUT],
["Date de fin", article.META.META_SPEC.META_ARTICLE.DATE_FIN], ["Date de fin", article.META.META_SPEC.META_ARTICLE.DATE_FIN],
["Identifiant", articleId], ["Identifiant", articleId],
["Ancien identifiant", article.META.META_COMMUN.ANCIEN_ID], ["Ancien identifiant", article.META.META_COMMUN.ANCIEN_ID],
// TODO: Mettre l'URL dans le Git Tricoteuses // TODO: Mettre l'URL dans le Git Tricoteuses
["URL", article.META.META_COMMUN.URL], ["URL", article.META.META_COMMUN.URL],
] ]
.filter(([, value]) => value !== undefined) .filter(([, value]) => value !== undefined)
.map(([key, value]) => `${key}: ${value}`) .map(([key, value]) => `${key}: ${value}`)
.join("\n")} .join("\n")}
--- ---
###### ${articleTitle} ###### ${articleTitle}
${await cleanHtmlFragment(article.BLOC_TEXTUEL?.CONTENU)} ${await cleanHtmlFragment(article.BLOC_TEXTUEL?.CONTENU)}
` + "\n", `,
) )
if (fileChanged) { if (fileChanged) {
await git.add({ await git.add({