fix(bash): highlight command line options (--option)#4376
Open
KJyang-0114 wants to merge 2 commits intohighlightjs:mainfrom
Open
fix(bash): highlight command line options (--option)#4376KJyang-0114 wants to merge 2 commits intohighlightjs:mainfrom
KJyang-0114 wants to merge 2 commits intohighlightjs:mainfrom
Conversation
Add highlighting for long options (--option) in bash to address issue highlightjs#4288. Previously, command line options like --project, --env were not highlighted consistently across lines. This change adds an OPTION pattern that highlights long options when they appear after whitespace, making them visually distinct in CLI examples.
Author
|
Hi maintainers! This PR has been waiting for review. Is there anything I can improve or address? The change adds proper highlighting for long CLI options (--option) in bash. |
Updates test expectations to match the new behavior from PR highlightjs#4376 which adds highlighting for long CLI options (--option) in bash.
Author
|
👋 Hi maintainers! This PR adds highlighting for long CLI options (--option) in bash to fix issue #4288. All tests pass (1570 passing) and the PR is ready to merge. Happy to make any adjustments if needed. Thanks! |
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.
This PR adds highlighting for long command line options (--option) in bash to address issue #4288.
Problem
Previously, command line options like
--project,--env,--deployment-packagewere not highlighted consistently across lines in bash code blocks. Some would havehljs-built_inclass while others had no class at all.Solution
Add an OPTION pattern that highlights long options when they appear after whitespace. This makes CLI examples more readable.
Testing
Tested manually:
epi deployment start --project my-project --env Integration --direct-deploy trueNow outputs:
Test Updates
Updated 2 test expectation files to reflect the new behavior:
test/markup/bash/token-containing-keyword.expect.txttest/markup/shell/command-continuation.expect.txtAll tests now pass (1570 passing).
Fixes
Fixes #4288