Exclude sections from run button in docs#3404
Merged
Conversation
Disable the runnable JS button on JS blocks that aren't suitable for running inline.
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR adds the ability to selectively disable the runnable JavaScript button on certain documentation sections that aren't suitable for inline code execution.
- Introduces a configuration option to specify which markdown files should have the run button disabled
- Modifies the markdown rendering logic to conditionally apply the custom renderer based on the file being processed
- Adds four specific documentation files to the blocked list (intro, notation, getting-started, and core/init)
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| documentation/docmaker.mjs | Implements conditional renderer selection based on blocked file configuration |
| documentation/docmaker.json | Adds configuration array listing files where run buttons should be disabled |
Comment on lines
+93
to
+95
| let mdBtnAllowed = !mdBtnBlocked; | ||
|
|
||
| if( mdBtnAllowed ){ |
There was a problem hiding this comment.
The variable 'mdBtnAllowed' is redundant since it's just the negation of 'mdBtnBlocked'. Consider using '!mdBtnBlocked' directly in the conditional check to reduce unnecessary variables.
Suggested change
| let mdBtnAllowed = !mdBtnBlocked; | |
| if( mdBtnAllowed ){ | |
| if( !mdBtnBlocked ){ |
maxkfranz
added a commit
that referenced
this pull request
Aug 12, 2025
…cs-run-btn-excl Exclude sections from run button in docs
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.
Cross-references to related issues. If there is no existing issue that describes your bug or feature request, then create an issue before making your pull request.
Associated issues:
Notes re. the content of the pull request. Give context to reviewers or serve as a general record of the changes made. Add a screenshot or video to demonstrate your new feature, if possible.
Checklist
Author:
unstable. Bug-fix patches can go on eitherunstableormaster.index.d.tsTypescript definition file has been appropriately updated.Reviewers:
masterbranch and theunstablebranch. Normally, this just requires cherry-picking the corresponding merge commit frommastertounstable-- or vice versa.