File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11// Hashtag directives a user can add to a toot to steer rendering.
22const 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
55export 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 */
1920export function parseDirectives ( text : string ) : Directives {
2021 let machineType : number | undefined ;
You can’t perform that action at this time.
0 commit comments