From a91714bfc55d6f6ed8a0ae3f3d53919ef4981984 Mon Sep 17 00:00:00 2001 From: Sappique Date: Tue, 14 Apr 2026 20:24:36 +0200 Subject: [PATCH] fix(loader): accept 'source' as fallback for Iframe src attribute Iframe component tables in several chapter Google Docs use a `source` row name instead of `src`. The transformer only reads `attrs.src`, so the iframe is rendered with no URL and the page shows an infinite loading spinner. Reading `attrs.src ?? attrs.source` tolerates both conventions. Refs #5 --- src/textbook-loader/transformer.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/textbook-loader/transformer.ts b/src/textbook-loader/transformer.ts index 364dbf7..24c91ad 100644 --- a/src/textbook-loader/transformer.ts +++ b/src/textbook-loader/transformer.ts @@ -338,7 +338,7 @@ export class Transformer { private convertIframe(attrs: Record): Node { return this.createNode("Iframe", { - src: this.getTrimmedString(attrs.src), + src: this.getTrimmedString(attrs.src ?? attrs.source), stillImage: this.getImage(attrs["still_image"]), caption: this.getSpanGroup(attrs["caption"]) })