Add language icons for bash and zsh codeblocks - #362
Open
RanRhoads84 wants to merge 1 commit into
Open
Conversation
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>
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.
Description
Adds
"Bash"and"Zsh"entries to theLANGUAGESmap insrc/Settings.ts, reusing the existing"Shell"terminal icon and#d9b400colour. Entries are placed alphabetically (BashbeforeBatch,ZshafterZig).Motivation and Context
```shcodeblocks show the yellow terminal icon in the codeblock header, but```bashand```zshblocks show none.LANGUAGE_NAMESmaps the fence languagesbash→"Bash"andzsh→"Zsh", butLANGUAGESonly defines an icon under"Shell", sogetLanguageIcon()returnsundefinedfor 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 assh/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.jsin a live Obsidian vault and confirmed```bashand```zshcodeblocks now render the same terminal icon as```sh, with tag text unchanged.tsc --noEmitreports no errors insrc/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/shellicon.Types of changes
Checklist
🤖 Generated with Claude Code