expose getOpt error handling to frontend

This commit is contained in:
Tangent 2023-10-20 18:22:08 -04:00
parent 594d81b745
commit 6196f6c4aa
3 changed files with 11 additions and 15 deletions

View file

@ -1,8 +1,8 @@
import { Card, CardVm, GetField } from './lib/card';
import { ALL as HTML } from './lib/html';
import { parse } from './parser';
import { runNoctl, Vm } from './vm';
import { AsHtml, AsText, TextPiece } from './words';
import { Card, CardVm, GetField } from "./lib/card";
import { ALL as HTML } from "./lib/html";
import { parse } from "./parser";
import { runNoctl, Vm } from "./vm";
import { AsHtml, AsText, TextPiece } from "./words";
/**
* Updates a card's fields
@ -65,7 +65,7 @@ title "Hello, World!"
const codeInput = document.createElement("textarea");
Object.assign(codeInput.style, TEXTAREA_STYLE, { height: "20em" });
codeInput.value = String.raw`
h1 "Hello, World!"
h1 [get title]
para [2 + 2]
block {
This is a paragraph of text, with one [b bold] word. Yes, this means there has to be some magic in text processing... <b>this</b> won't work.