fix(json-viewer): makeIdUniqueのfalsy判定バグを修正 (v30) - #148
Merged
Conversation
pm-onyx-bot
force-pushed
the
fix/json-viewer-makeIdUnique
branch
3 times, most recently
from
July 1, 2026 11:56
02cc637 to
04a96be
Compare
- !idCounter[baseId] → idCounter[baseId] === undefined - 同baseIdの2回目以降でカウンタが0のときにリセットされる問題を解決 - _data と data などアンダースコア有無によるTOC見出しID重複を修正 - json-viewer.js コメントヘッダーのバージョンも v29→v30 に更新(build.js が参照するため)
pm-onyx-bot
force-pushed
the
fix/json-viewer-makeIdUnique
branch
from
July 1, 2026 12:09
9fef686 to
3d5d23e
Compare
- URLに ?t=Date.now() を付与してCI実行ごとに異なるURLに - htmlpreview.github.io の独自キャッシュに悩まされない
Contributor
🎉 Build Successful!🔗 即座に動作確認以下のリンクから、ダウンロード不要でブックマークレットを確認できます: このページでブックマークレットをブックマークバーにドラッグ&ドロップして、すぐに動作確認できます。 |
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.
修正内容
makeIdUnique関数の falsy 判定バグを修正。バグ
カウンタが
0のときに!0 === trueでリセットされ、同baseIdの2回目も同じIDが返っていた。修正
影響
[0].dataと[0]._dataが同じ heading ID0-dataになり、TOCの_dataをクリックしてもdataに遷移する問題を解決[0].codeも重複IDになっていた問題を修正-1サフィックスが付く(例:0-data-1)バージョンアップ
補足
#77 より。closeはしない(別issueで管理)。