Deprecate descriptionPlaintext field
This commit is contained in:
parent
a713adc1ec
commit
688f9b982d
27 changed files with 64 additions and 121 deletions
|
|
@ -215,13 +215,18 @@ export const GET: APIRoute<Props, Params> = async ({ props: { story }, site }) =
|
|||
(_, group1, group2) => `[${group1}](${new URL(group2, site).toString()})`,
|
||||
);
|
||||
if (exportFormat === "bbcode") {
|
||||
return [website, markdownToBbcode(storyDescription).replaceAll(/\n\n\n+/g, "\n\n").trim()];
|
||||
return [
|
||||
website,
|
||||
markdownToBbcode(storyDescription)
|
||||
.replaceAll(/\n\n\n+/g, "\n\n")
|
||||
.trim(),
|
||||
];
|
||||
} else if (exportFormat === "markdown") {
|
||||
return [website, storyDescription.replaceAll(/\n\n\n+/g, "\n\n").trim()];
|
||||
} else {
|
||||
throw new Error(`Unhandled export format "${exportFormat}"`);
|
||||
}
|
||||
})
|
||||
}),
|
||||
);
|
||||
|
||||
const storyHeader =
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue