GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — feat: KaTeX CSS/font 完全オフライン化 + tmp 脆弱性解消 by ymnao · Pull Request #145 · ymnao/scripta

Conversation

@ymnao

@ymnao ymnao commented Jun 7, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Owner

Summary

  • Dep Chore(deps-dev): Bump electron from 41.3.0 to 42.0.0 in the electron group across 1 directory #7: [email protected] の Path Traversal 脆弱性を pnpm-workspace.yaml の override で >=0.2.6 に強制して解消(ビルド時のみの transitive dep、ランタイム影響なし)
  • feat: PDF export を完全オフライン化(KaTeX CSS / font を同梱) #121: PDF/HTML export 時の KaTeX CSS を CDN <link> からビルド時生成の inline <style> に置換し、完全オフライン化
    • scripts/generate-katex-css.js が katex.min.css の woff2 font を data: URI に inline 化(woff/ttf fallback は除去)
    • postinstall / dev / build に生成スクリプトを chain
    • 生成ファイル src/generated/katex-inline-css.ts は gitignore(~359KB)

Closes #121

Test plan

  • pnpm verify(format / lint / typecheck / test / e2e / build)通過
  • pnpm test:e2e 160 tests passed
  • pnpm test:e2e:electron(実 Electron 起動モード)
  • 実アプリで数式を含む Markdown を PDF / HTML export し、オフラインで数式が正しく表示されることを確認

🤖 Generated with Claude Code

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
ymnao and others added 2 commits June 7, 2026 11:52
@ymnao @claude
fix(deps): [email protected] の Path Traversal 脆弱性を override で解消(Dep #7)
6f300d0
tmp-promise → [email protected](GHSA 対象)を >=0.2.6 に強制。
ビルド時のみ使用される transitive dep のため、ランタイム影響なし。

Co-Authored-By: Claude Opus 4.6 <[email protected]>
@ymnao @claude
feat: PDF/HTML export の KaTeX CSS/font を完全オフライン化(#121)
8cc4b4d
- scripts/generate-katex-css.js でビルド時に katex.min.css の woff2 font を
  data: URI に inline 化し src/generated/katex-inline-css.ts に書き出す
- export.ts の CDN <link> を <style> による inline 埋め込みに置換
- woff/ttf fallback を除去(woff2 は全モダンブラウザ対応済み)
- postinstall / dev / build の scripts に生成スクリプトを chain

Co-Authored-By: Claude Opus 4.6 <[email protected]>
Copilot AI review requested due to automatic review settings June 7, 2026 02:53
Copilot AI reviewed Jun 7, 2026

Copilot AI left a comment

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
ymnao and others added 2 commits June 7, 2026 12:19
@ymnao @claude
refactor: /simplify 指摘対応 — buildFence 切り出し・生成スクリプト改善
ac8e156
- buildFence を code-fence.ts へ移動し、MarkdownEditor が export.ts を
  eager import しなくなった(katexInlineCss ~368KB の起動時ロード回避)
- generate-katex-css.js に mtime チェック追加(up-to-date なら即終了)
- woff/ttf 除去 regex を 1 つに統合
- dist / test:e2e:electron の scripts に generate chain を追加(漏れ修正)

Co-Authored-By: Claude Opus 4.6 <[email protected]>
@ymnao @claude
fix: クリーン checkout で typecheck/test が壊れる問題を修正
929f4fc
src/generated/ は gitignore のため、postinstall 未実行の状態で
typecheck / test / dev:e2e 等を単独実行すると TS2307 で失敗していた。
生成スクリプトの mtime チェックにより up-to-date 時は即終了するため、
全コマンドに chain しても実行コストは無視可能。

Co-Authored-By: Claude Opus 4.6 <[email protected]>
Copilot AI review requested due to automatic review settings June 7, 2026 04:04
Copilot AI reviewed Jun 7, 2026

Copilot AI left a comment

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
ymnao and others added 2 commits June 7, 2026 13:26
@ymnao @claude
fix: プロンプト export のデフォルトテンプレートから CDN 記述を除去
c9e14dc
HTML/PDF export は inline CSS 化済みだが、プロンプト export の
指示文に CDN 利用の記述が残っていた。オフライン化の方針に合わせて
インライン CSS + data URL font の埋め込み指示に変更。

Co-Authored-By: Claude Opus 4.6 <[email protected]>
@ymnao @claude
fix: 生成スクリプトの stale mtime キャッシュ撤去 + テスト強化
1ed00ed
- mtime 比較による早期終了を削除。pnpm は package files に元の
  mtime を保持する場合があり、katex 更新時に再生成されない恐れがあった
- 生成スクリプトに変換後の self-check を追加(url(fonts/) や
  https?:// が CSS に残っていたら即エラー)
- テストに data:font/woff2;base64 の存在確認と url(fonts/) 不在、
  外部 stylesheet link 不在の assertion を追加

Co-Authored-By: Claude Opus 4.6 <[email protected]>
Copilot AI review requested due to automatic review settings June 7, 2026 04:50
Copilot AI reviewed Jun 7, 2026

Copilot AI left a comment

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@ymnao @claude
docs: exploratory-qa の KaTeX CDN 既知バグ記述を更新
8a0a928
#79 は #121 で解消済み、#93 も修正済みであることを反映。

Co-Authored-By: Claude Opus 4.6 <[email protected]>
@ymnao
ymnao merged commit 522b79b into main Jun 7, 2026
6 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@ymnao
ymnao deleted the feature/katex-offline branch June 7, 2026 05:11
@ymnao ymnao mentioned this pull request Jun 13, 2026
release: v0.3.0 #185
Merged
8 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

Copilot code review Copilot
Copilot review effort
Applies to this pull request for everyone.Learn more about Copilot code review.
Copilot left review comments

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

feat: PDF export を完全オフライン化(KaTeX CSS / font を同梱)

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@ymnao
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.