Skip to content

fix(bash): highlight command line flags/options fixes #4288#4367

Open
KJyang-0114 wants to merge 1 commit intohighlightjs:mainfrom
KJyang-0114:fix/issue-4288-bash-flags
Open

fix(bash): highlight command line flags/options fixes #4288#4367
KJyang-0114 wants to merge 1 commit intohighlightjs:mainfrom
KJyang-0114:fix/issue-4288-bash-flags

Conversation

@KJyang-0114
Copy link
Copy Markdown

Summary

This PR fixes issue #4288 where command line flags/options like --project, --deployment-package, etc. were not being consistently highlighted in bash code blocks.

The Problem

The issue reported that in bash commands with multiple flags:

  • Only some flags were highlighted as hljs-built_in
  • Other flags had no highlighting at all
  • This caused inconsistent colors between lines

The Fix

Added a new COMMAND_FLAGS pattern that highlights:

  • Long options: --option-name
  • Short options: -o

These are highlighted with the hljs-attr class for better visibility.

Testing

Before:

epi deployment start \
  --project my-project

After:

epi deployment start <span class="hljs-attr">--project</span> my-project

Closes #4288

Add highlighting for command line flags like --option and -o in bash.
This fixes inconsistent highlighting where only some flags were
highlighted as built_in while others had no highlighting.

Fixes highlightjs#4288
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

(Bash) Highlighted colors doesn't look correct

1 participant