mirror of
https://codeberg.org/yeentown/barkey
synced 2024-11-22 19:35:12 +00:00
wip
This commit is contained in:
parent
986780a39a
commit
5a49d14246
3 changed files with 4 additions and 5 deletions
|
@ -55,8 +55,7 @@ export default class Replacer {
|
|||
|
||||
public replacement(ctx, match, a, b, c) {
|
||||
const client = 'misskey/src/client/app/';
|
||||
const name = ctx.src.substr(ctx.src.indexOf(client) + client.length);
|
||||
if (name == '') return match;
|
||||
const name = ctx ? ctx.src.substr(ctx.src.indexOf(client) + client.length) : null;
|
||||
|
||||
let key = a || b || c;
|
||||
if (key[0] == '@') {
|
||||
|
|
|
@ -127,7 +127,7 @@ gulp.task('doc:api:endpoints', async () => {
|
|||
return;
|
||||
}
|
||||
const i18n = new I18nReplacer(lang);
|
||||
html = html.replace(i18n.pattern, i18n.replacement);
|
||||
html = html.replace(i18n.pattern, i18n.replacement.bind(null, null));
|
||||
html = fa(html);
|
||||
const htmlPath = `./built/client/docs/${lang}/api/endpoints/${ep.endpoint}.html`;
|
||||
mkdirp(path.dirname(htmlPath), (mkdirErr) => {
|
||||
|
@ -171,7 +171,7 @@ gulp.task('doc:api:entities', async () => {
|
|||
return;
|
||||
}
|
||||
const i18n = new I18nReplacer(lang);
|
||||
html = html.replace(i18n.pattern, i18n.replacement);
|
||||
html = html.replace(i18n.pattern, i18n.replacement.bind(null, null));
|
||||
html = fa(html);
|
||||
const htmlPath = `./built/client/docs/${lang}/api/entities/${kebab(entity.name)}.html`;
|
||||
mkdirp(path.dirname(htmlPath), (mkdirErr) => {
|
||||
|
|
|
@ -53,7 +53,7 @@ gulp.task('doc:docs', async () => {
|
|||
return;
|
||||
}
|
||||
const i18n = new I18nReplacer(lang);
|
||||
html = html.replace(i18n.pattern, i18n.replacement);
|
||||
html = html.replace(i18n.pattern, i18n.replacement.bind(null, null));
|
||||
html = fa(html);
|
||||
const htmlPath = `./built/client/docs/${lang}/${name}.html`;
|
||||
mkdirp(path.dirname(htmlPath), (mkdirErr) => {
|
||||
|
|
Loading…
Reference in a new issue