Skip to content

Commit

Permalink
Merge branch 'main' of github.com:quarto-dev/quarto-cli into main
Browse files Browse the repository at this point in the history
  • Loading branch information
jjallaire committed Apr 15, 2022
2 parents 0a47ba0 + 8f2789c commit 237f982
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/command/render/pandoc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -626,14 +626,24 @@ export async function runPandoc(
options.source,
pandocMetadata[kDate] as string,
);

// Since there is no date format specified, we
// should default format this so it isn't a timestamp
if (!pandocMetadata[kDateFormat]) {
const parsed = parsePandocDate(pandocMetadata[kDate]);
pandocMetadata[kDate] = formatDate(
parsed,
"short",
);
}
}

// Format the date
if (pandocMetadata[kDate] && pandocMetadata[kDateFormat]) {
const parsed = parsePandocDate(pandocMetadata[kDate]);
pandocMetadata[kDate] = formatDate(
parsed,
pandocMetadata[kDateFormat] as string || "iso",
pandocMetadata[kDateFormat] as string,
);
}

Expand Down

0 comments on commit 237f982

Please sign in to comment.