feat(tabs): interactive tabs via '## Title {.tabs}' heading class#87
Open
teezeit wants to merge 1 commit intoakonan:mainfrom
Open
feat(tabs): interactive tabs via '## Title {.tabs}' heading class#87teezeit wants to merge 1 commit intoakonan:mainfrom
teezeit wants to merge 1 commit intoakonan:mainfrom
Conversation
Mirrors the grid pattern: heading with .tabs class declares the tabs
container; direct child headings (depth+1) become tab panels. First
tab active by default; {.active} on a sub-heading overrides.
- Parser: detect .tabs class in top-level loop, emit tabs/tab nodes
- Renderer: tabs case emits header row + panel divs, injects one-time
click-delegated switcher script (idempotent via window.__wmdTabsInit)
- Styles: structural underline tab rules in getStyleCSS wrapper,
sketch-specific color overrides
- Docs: updated syntax guide and SYNTAX-SPEC
- Tests: 7 parser + 6 renderer tests
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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
## Title {.tabs}heading class declares a tabs container; child###headings become tab panels{.active}on a child heading overrideswmdSwitchTabscript once per page (idempotent viawindow.__wmdTabsInit)docs/guide/syntax.mdandSYNTAX-SPEC-v0.1.mdSyntax
Implementation notes
Mirrors the existing grid pattern: same top-level loop in
transformToWiremdAST, same heading-depth traversal for child collection. Tab CSS uses an underline indicator (border-bottom) rather than pills to match standard tab conventions.Test plan
## Heading {.tabs}renders tab headers + panels{.active}on a child heading overridesnpm testpasses (484 tests)🤖 Generated with Claude Code