Sync-in · Sovereign platform for file storage, sharing, synchronization, and collaboration.
TypeScript cloud-alternativecollaborationcollaborative-editingdropboxfile-serverfile-sharingfile-storagefile-syncfull-text-searchhomelabnextcloudon-premiseopen-sourceprivacy-firstprivate-cloudrealtimesecureself-hostedstorage-serverwebdav
import fs from 'fs/promises'
const regexMarkdownCommon = /[`*_#>|[\]()!~-]/g
function normalizeMarkdown(content: string): string {
return content.replace(regexMarkdownCommon, ' ')
}
export async function parseMarkdown(filePath: string): Promise<string> {
const content = await fs.readFile(filePath, { encoding: 'utf8' })
return normalizeMarkdown(content)
}