diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 279787a..a5ee679 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -13,5 +13,6 @@ jobs:
- uses: actions/checkout@v2
- uses: ./.github/actions/setup
- run: yarnpkg build
+ - run: make -C src/web/notebook
- run: yarnpkg lint
- run: yarnpkg test --coverage
diff --git a/README.md b/README.md
index d106b83..049a1c6 100644
--- a/README.md
+++ b/README.md
@@ -164,9 +164,9 @@ Because it is powered by WebAssembly, this extension works both in the desktop v
"];
+ for (const cell of nb.cells) {
+ switch (cell.kind) {
+ case 1:
+ if (title == null) {
+ let m: RegExpExecArray | null = null;
+ for (const v of cell.value.split("\n")) {
+ m = titleRE.exec(v);
+ if (m != null) {
+ break;
+ }
+ }
+ if (m != null) {
+ title = m[1].trim();
+ }
+ }
+ out.push(
+ "
" + marked.parse(cell.value) + "
"
+ );
+ break;
+ case 2:
+ out.push(
+ "
" +
+ escapeHTML(cell.value) +
+ "
"
+ );
+ break;
+ default:
+ throw new Error("unexpected kind");
+ }
+ }
+ out.push("
");
+
+ out = [`