Merge branch 'main' into merge-upstream-2025-01-17

This commit is contained in:
leah 2025-02-03 15:53:27 +00:00
commit 0ceb07314b
4 changed files with 27 additions and 3 deletions

2
locales/index.d.ts vendored
View file

@ -6875,7 +6875,7 @@ export interface Locale extends ILocale {
};
"_tutorialCompleted": {
/**
* Misskey初心者講座
* Forkey初心者講座
*/
"title": string;
/**

View file

@ -72,6 +72,25 @@ watch(() => props.lang, (to) => {
</script>
<style module lang="scss">
.codeBlockRoot {
text-align: left;
}
.codeBlockRoot :global(.shiki) > code {
counter-reset: step;
counter-increment: step 0;
}
.codeBlockRoot :global(.shiki) > code > span::before {
content: counter(step);
counter-increment: step;
width: 1rem;
margin-right: 1.5rem;
display: inline-block;
text-align: right;
color: rgba(115,138,148,.4)
}
.codeBlockRoot :global(.shiki) {
padding: 1em;
margin: .5em 0;

View file

@ -206,7 +206,8 @@ watch(v, newValue => {
outline: 0;
min-width: calc(100% - 24px);
height: 100%;
padding: 12px;
// the +2.5 rem is because of the line numbers
padding: 12px 12px 12px calc(12px + 2.5rem);
line-height: 1.5em;
font-size: 1em;
font-family: Consolas, Monaco, Andale Mono, Ubuntu Mono, monospace;

View file

@ -64,8 +64,12 @@ export async function parsePluginMeta(code: string): Promise<AiScriptPluginMeta>
try {
ast = parser.parse(code);
} catch (err) {
if (err instanceof Error) {
throw new Error(`Aiscript syntax error\n${(err as Error).message}`);
} else {
throw new Error('Aiscript syntax error');
}
}
const meta = Interpreter.collectMetadata(ast);
if (meta == null) {