1
0
mirror of https://github.com/laurent22/joplin.git synced 2024-12-30 10:36:35 +02:00
joplin/packages/tools/website/utils/convertLinksToLocale.ts

10 lines
196 B
TypeScript
Raw Normal View History

2023-04-23 23:33:15 +02:00
import { Locale } from './types';
export default (md: string, locale: Locale) => {
if (locale.lang === 'en-gb') return md;
md = md.replace(/\(\//g, `(/${locale.pathPrefix}/`);
return md;
};