Skip to content

Commit 8f5ca3d

Browse files
committed
Mastodon bot support for Boriel BASIC
1 parent f8ff81a commit 8f5ca3d

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

apps/mastodon-bot/src/directives.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// Hashtag directives a user can add to a toot to steer rendering.
22
const MACHINE_TAGS: Record<string, number> = { '128': 128, '48': 48 };
3-
const LANG_TAGS: Record<string, string> = { asm: 'asm' };
3+
const LANG_TAGS: Record<string, string> = { asm: 'asm', zxbasic: 'zxbasic' };
44

55
export interface Directives {
66
machineType?: number; // from #128 / #48
@@ -12,9 +12,10 @@ export interface Directives {
1212
* Pull rendering directives out of plain-text toot content (the output of
1313
* htmlToBasic) and return the remaining source.
1414
*
15-
* Only the exact recognised tags (#128, #48, #asm) are stripped; every other
16-
* `#token` is left in place — Sinclair BASIC uses # for stream numbers
17-
* (PRINT #2), so blanket stripping would corrupt valid programs.
15+
* Only the exact recognised tags (#128, #48, #asm, #zxbasic) are stripped;
16+
* every other `#token` is left in place — Sinclair BASIC uses # for stream
17+
* numbers (PRINT #2) and Boriel uses #include / #define, so blanket stripping
18+
* would corrupt valid programs.
1819
*/
1920
export function parseDirectives(text: string): Directives {
2021
let machineType: number | undefined;

0 commit comments

Comments
 (0)