Repository navigation
fix(compiler): render markdown details and summary blocks into interactive accordions and add Gate 13 audit - #4
Merged
Conversation
…ctive accordions and add Gate 13 audit
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.
Summary
This PR addresses user feedback regarding markdown
<details>and<summary>blocks (such as Researcher's Corner and Self-Test Questions) leaking raw escaped text (<details>,<summary>) and leaving the content spilled open on the live static documentation page.Root Cause Analysis
scripts/build-docs.py, the custom markdown compilerrender_markdown()had no block-level parser for<details>or<summary>.<p class="md-p">.inline_formatting(), the regexre.sub(r'<(?=[0-9a-zA-Z\s\-])', '<', text)indiscriminately escaped all valid HTML opening tags, turning<details>and<summary>into literal<details>and<summary>entity text.Key Changes
scripts/build-docs.py):details_stack) inrender_markdown()to emit semantic<details class="md-details">,<summary class="md-summary">, and<div class="md-details-body">.HTML_TAG_PATTERNininline_formatting()to protect all standard HTML tags (details,summary,b,strong,code,br, etc.) while safely converting mathematical comparison operators (<,>,<=,>=) to HTML entities/unicode symbols.docs/site/style.css):.md-detailswith subtle borders, glassmorphic backgrounds, and smooth hover glow..md-summarywith flex layout, custom chevrons (.md-summary-chevron), and 90-degree expansion animations.[data-theme="mica"].docs/site/app.js):.md-summarytoHapticAudio.expand()andHapticAudio.collapse()on user click.Expand AllandCollapse Allreading modes to control all.md-detailselements.scripts/test-docs.sh,scripts/audit_collapsible_elements.py):scripts/audit_collapsible_elements.py.scripts/test-docs.sh, validating tag balance across all 42 source markdown files and asserting 0 raw/escaped HTML leaks in_site/index.html.test-detailstarget intoMakefileand.github/workflows/ci.yml.Verification
make ci: Passed all 13 gates deterministically (100% compliance).fund-mod-002-hash-tabledisplays Perfect Hashing & FKS Two-Level Scheme as a closed, interactive accordion that opens and closes on click.