GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — fix: PDF export の KaTeX CSS CDN URL が古いバージョンで固定 (export.ts:412) · Issue #79 · ymnao/scripta Closed Description現象
// src/lib/export.ts:412 <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.css"> 本 issue 作成時点では本体が 再現手順
※ 0.16.x の minor 程度であれば描画差はほぼ無視できるレベルだが、構造的に常に乖離リスクが残る。 期待する動作PDF export 時に読み込まれる KaTeX CSS のバージョンが、 実際の動作CDN URL のバージョン部分が文字列リテラルでハードコーディングされており、依存 bump のタイミングで人手で書き換える運用になっている(実態として運用されておらず、長期間放置されている)。 修正方針候補Option A: 同梱 CSS を bundle する(推奨)
// 例 import katexCss from "katex/dist/katex.min.css?raw"; // ... <style>${katexCss}</style> Pros:
Cons:
Option B: 動的にバージョンを差し込む
import { version as katexVersion } from "katex/package.json"; const cssUrl = `https://cdn.jsdelivr.net/npm/katex@${katexVersion}/dist/katex.min.css`; Pros:
Cons:
推奨Option A を推奨。PDF export はそもそも「ローカル環境でファイルを生成する」ユースケースであり、CDN 依存を持つ設計が筋悪。 関連
Activity
MetadataMetadataAssigneesLabelsbugSomething isn't working TypeProjectsMilestoneRelationshipsDevelopmentIssue actions |
| You are visitor 01402775 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |