You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note: I started a full go test ./... run but stopped it after the changed server package passed because the broader tinkerdown root package suite is browser-heavy and long-running.
html.EscapeString escapes HTML entities but does not strip javascript: URIs. If SourceRepo were set to javascript:alert(document.cookie), the resulting href attribute would execute JS in the user's browser.
SourceRepo comes from frontmatter in controlled markdown files, so the practical risk is low today, but it's a fragile invariant — a single malformed or adversarially-crafted sync could introduce it. A minimal fix:
This is pre-existing, but this PR is the first to inject adjacent HTML (the search button) right next to the unescaped title interpolation. Not a new bug, but worth noting if s.config.Title can ever contain user-controlled content.
3. parseSections performs a redundant DOM query — client/src/core/page-toc.ts
4. page-toc-level-2 class is added but has no CSS rule
The template literal now emits page-toc-level-2 on every H2 <li>, but page-toc.css only defines .page-toc-level-3. This isn't broken — H2 items still pick up styling through .page-toc-item — but adding an unused class introduces a subtle inconsistency. Either add a no-op .page-toc-level-2 {} comment acknowledging this is intentional, or emit the level class only when level === 3.
Minor notes
The SourceRef / SourceCommit wiring in page.go / tinkerdown.go / parser.go is clean and consistent with existing SourceRepo / SourcePath patterns. No concerns.
Fixing the hardcoded "true" debug meta to "%t" with the actual config value is a genuine bug fix — good catch.
The existingButton short-circuit in search.ts cleanly avoids double-attaching the click listener when the server renders the button. The data-search-button sentinel attribute is a nice coordination mechanism.
The H3 inclusion thresholds (≥8 H2s or ≥10 H3s) are reasonable and the comment explains the intent well.
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
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.
Summary
Validation
Note: I started a full go test ./... run but stopped it after the changed server package passed because the broader tinkerdown root package suite is browser-heavy and long-running.