Skip to content

Add language icons for bash and zsh codeblocks - #362

Open
RanRhoads84 wants to merge 1 commit into
mayurankv:mainfrom
RanRhoads84:add-bash-zsh-icons
Open

Add language icons for bash and zsh codeblocks#362
RanRhoads84 wants to merge 1 commit into
mayurankv:mainfrom
RanRhoads84:add-bash-zsh-icons

Conversation

@RanRhoads84

Copy link
Copy Markdown

Description

Adds "Bash" and "Zsh" entries to the LANGUAGES map in src/Settings.ts, reusing the existing "Shell" terminal icon and #d9b400 colour. Entries are placed alphabetically (Bash before Batch, Zsh after Zig).

Motivation and Context

```sh codeblocks show the yellow terminal icon in the codeblock header, but ```bash and ```zsh blocks show none. LANGUAGE_NAMES maps the fence languages bash"Bash" and zsh"Zsh", but LANGUAGES only defines an icon under "Shell", so getLanguageIcon() returns undefined for those tags and no icon is rendered. Since bash and zsh are among the most common shell fence languages, they should get the same icon as sh/shell.

The displayed language tag text is unaffected — it stays "Bash" and "Zsh".

How has this been tested?

Applied the identical entries to the built main.js in a live Obsidian vault and confirmed ```bash and ```zsh codeblocks now render the same terminal icon as ```sh, with tag text unchanged. tsc --noEmit reports no errors in src/Settings.ts (pre-existing errors in other files are untouched). No other areas of the code are affected — the change only adds two data entries.

Screenshots

N/A — icon is identical to the existing sh/shell icon.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist

  • I have checked no similar existing pull requests exist
  • I have checked the CONTRIBUTING document
  • My code follows the code style of this project
  • My change requires a change to the documentation
  • I have updated the documentation accordingly

🤖 Generated with Claude Code

LANGUAGE_NAMES maps the fence languages bash -> "Bash" and zsh -> "Zsh",
but the LANGUAGES map only defines an icon for "Shell", so bash and zsh
codeblocks render no header icon. Add "Bash" and "Zsh" entries reusing
the existing Shell terminal icon and colour.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.

1 participant