mirror of
https://github.com/getpaseo/paseo.git
synced 2026-07-29 12:01:31 +00:00
Detect .md and .markdown files in the shared file pane and render them as markdown instead of syntax highlighted code. This makes README-style files easier to read without changing the existing preview flow for other text files or .mdx. Keep the change focused to the app renderer by reusing the existing markdown stack and adding a narrow extension check with targeted coverage.
5 lines
207 B
TypeScript
5 lines
207 B
TypeScript
export function isRenderedMarkdownFile(filePath: string): boolean {
|
|
const normalizedPath = filePath.trim().toLowerCase();
|
|
return normalizedPath.endsWith(".md") || normalizedPath.endsWith(".markdown");
|
|
}
|