Skip to content

Commit

Permalink
Merge pull request #183 from KevinBatdorf/fix-missing-lang-bug
Browse files Browse the repository at this point in the history
Fix Wolfram language bug
  • Loading branch information
KevinBatdorf authored May 1, 2023
2 parents 4b1b529 + f427c48 commit 573d2d1
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 3 deletions.
4 changes: 4 additions & 0 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,10 @@ Themes are rendered inside the editor as you type or make changes, so the code b

== Changelog ==

- Tweak: Removes the filtering of bash and zsh filtering
- Fix: Better language sorting (by label instead of key)
- Fix: Fix typo in Wolfram language key

= 1.16.0 - 2023-04-30 =
- Feature: Added new language grammars: GD Script, GD Resource, GD Shader, GLSL, Http, Jison, JSON5, Kusto (kql), Protocol Buffers (.proto), Windows Registry (.reg), V, WGSL, and Wolfram
- Tweak: Removed toolbar language select and added functionality to focus on the sidebar setting
Expand Down
2 changes: 1 addition & 1 deletion src/defaultLanguages.json
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@
"wenyan": "Wenyan",
"文言": "Wenyan",
"wgsl": "WGSL",
"wolframe": "Wolfram",
"wolfram": "Wolfram",
"xml": "XML",
"xsl": "XSL",
"yaml": "YAML",
Expand Down
5 changes: 4 additions & 1 deletion src/editor/controls/Sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ export const SidebarControls = ({
const { updateThemeHistory } = useThemeStore();
const { setPreviousSettings, bringAttentionToPanel } = useGlobalStore();
const { headerType, footerType } = attributes;
const languagesSorted = new Map(
Object.entries(languages).sort((a, b) => a[1].localeCompare(b[1])),
);

const footersNeedingLinks = ['simpleStringEnd', 'simpleStringStart'];

Expand Down Expand Up @@ -83,7 +86,7 @@ export const SidebarControls = ({
)
: null
}
options={Object.entries(languages).map(
options={[...languagesSorted.entries()].map(
([value, label]) => ({
label: label.replace(
'ANSI',
Expand Down
3 changes: 2 additions & 1 deletion src/util/languages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ export const codeAliases = {
java: ['javafx'],
javascript: ['jscript', 'js'],
jssm: ['fsl'],
kusto: ['kql'],
make: ['makefile'],
markdown: ['md'],
matlab: ['matlabkey'],
Expand All @@ -31,7 +32,7 @@ export const codeAliases = {
ruby: ['rb'],
rust: ['rs'],
shaderlab: ['shader'],
shellscript: ['shell', 'bash', 'sh', 'zsh'],
shellscript: ['shell', 'sh'],
stylus: ['styl'],
typescript: ['ts'],
vb: ['cmd'],
Expand Down

0 comments on commit 573d2d1

Please sign in to comment.