Repository navigation
feat: Mermaid の図を GitHub の見た目に寄せる - #38
Merged
Merged
Conversation
同梱の mermaid を 12.2.0 に上げ、@mermaid-js/layout-elk 1.0.1 を IIFE にまとめて同じファイルの末尾につなぐ。ELK で書いた順を保って配置し、ラベルを狭い幅で折り返し、ノードを暗い塗りと灰色の枠と影で描く。図の背景は本文のコードより暗くする。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
変更内容
@mermaid-js/layout-elk1.0.1 を esbuild で IIFE にまとめ、codeview/assets/mermaid.min.jsの末尾につないだ(file://でも動くよう、通常のスクリプト1本のまま)render.pyのmermaid.initializeで ELK を使い、書いた順を保って配置する(considerModelOrder)。ラベルはwrappingWidth: 130で折り返す。ノードの塗り・枠・線の色を指定したstyle.pyで図の背景を暗くし、ノードに影を付けたLICENSE.mermaidの版を更新し、layout-elk と、それに含まれる elkjs(EPL-2.0)を書き足した確認
nix develop -c pytest -q: 88 件が通る残り