Repository navigation
feat: Add support for checkbox inputs in markdown with tests ☑️ - #9
Open
sanjaiyan-dev wants to merge 3 commits into
Open
sanjaiyan-dev wants to merge 3 commits into
sanjaiyan-dev wants to merge 3 commits into
Conversation
sanjaiyan-dev
commented
Nov 6, 2026
| if (props.type === 'checkbox') { | ||
| return props.checked || props.defaultChecked ? '[x] ' : '[ ] '; | ||
| } | ||
| return ''; |
Author
There was a problem hiding this comment.
Suggested change
| return ''; | |
| return getChildrenMarkdown(); |
Author
There was a problem hiding this comment.
Hi, I initially thought that returning an empty string would be correct because the input tag is a self-closing tag when executing getChildrenMarkdown(). I apologize for the inconvenience.
Author
|
Hi @SoonIter, could you approve the CI workflow and take a look at this when you get a chance? I needed checkbox support for a project I'm working on, so I figured I'd send a PR. No rush, just let me know if anything needs changing |
This branch has not been deployed
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.
Hi,
Added support for rendering checkbox inputs properly so task lists can output as
[x]or[ ]. It checks bothcheckedanddefaultCheckedprops, and other input types are ignored as empty strings.Also added a test case covering checked, defaultChecked, unchecked, and ignored inputs. All tests are passing.
Please have a look and let me know if any changes are needed. Thanks :)