Skip to content

Commit

Permalink
Update langs
Browse files Browse the repository at this point in the history
  • Loading branch information
JSerZANP committed Jul 5, 2024
1 parent 3d47510 commit 34a106d
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 20 deletions.
3 changes: 2 additions & 1 deletion examples/web/components/CodeSnippet.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import { AiFillGithub } from "react-icons/ai";
import { BsStars } from "react-icons/bs";
import { RiShareBoxLine } from "react-icons/ri";
import { defaultCode } from "remark-shaku-code-annotate";
import { supportedLangs } from "shaku-code-annotate-shiki";
import { Button, Column, Row, Text, View } from "./bare";

const CodeSnippetPreview = dynamic(() => import("./CodeSnippetPreview"), {
Expand All @@ -22,6 +21,8 @@ const CodeSnippetPreviewTransformer = dynamic(
}
);

const supportedLangs = Object.keys(defaultCode);

export function CodeSnippet({
code: _code,
lang: _lang,
Expand Down
1 change: 0 additions & 1 deletion examples/web/components/TOC.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ export function TOC({ children }: { children: React.ReactNode }) {
})
);
const highlight = () => {
console.log("highlight");
const scrollTop = window.scrollY;
const active = list.findLast(({ el }, i) => {
if (el == null) return i === 0;
Expand Down
36 changes: 18 additions & 18 deletions packages/shaku-code-annotate-shiki/src/defaultCode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1531,10 +1531,10 @@ export const supportedLangs = [
"astro",
"awk",
"ballerina",
// "bat",
"bat",
"batch",
"berry",
// "be",
"be",
// "bibtex",
"bicep",
"blade",
Expand All @@ -1552,25 +1552,25 @@ export const supportedLangs = [
"cpp",
"crystal",
"c#",
// "cs",
"cs",
"css",
"cue",
"d",
"dart",
"dax",
// "diff", // nothing to test
// "docker",
"docker",
"dockerfile",
"dream-maker",
"elixir",
"elm",
"erb",
"erlang",
// "erl",
"erl",
"fish",
// "fsharp",
"fsharp",
"f#",
// "fs",
"fs",
// "gdresource",
// "gdscript",
// "gdshader",
Expand All @@ -1585,9 +1585,9 @@ export const supportedLangs = [
"hack",
"haml",
"handlebars",
// "hbs",
"hbs",
"haskell",
// "hs",
"hs",
"hcl",
"hlsl",
"html",
Expand All @@ -1597,7 +1597,7 @@ export const supportedLangs = [
"properties",
"java",
"javascript",
// "js",
"js",
// "jinja-html",
"jison",
// "json",
Expand All @@ -1620,7 +1620,7 @@ export const supportedLangs = [
"make",
"makefile",
"markdown",
// "md",
"md",
"marko",
"matlab",
"mdx",
Expand All @@ -1629,7 +1629,7 @@ export const supportedLangs = [
"nim",
"nix",
"objective-c",
// "objc",
"objc",
"objective-cpp",
"ocaml",
"pascal",
Expand All @@ -1639,7 +1639,7 @@ export const supportedLangs = [
// "postcss",
"powerquery",
"powershell",
// "ps",
"ps",
// "ps1",
"prisma",
"prolog",
Expand All @@ -1658,9 +1658,9 @@ export const supportedLangs = [
"riscv",
// "rst",
"ruby",
// "rb",
"rb",
"rust",
// "rs",
"rs",
"sas",
"sass",
"scala",
Expand All @@ -1681,7 +1681,7 @@ export const supportedLangs = [
"ssh-config",
"stata",
"stylus",
// "styl",
"styl",
"svelte",
"swift",
"system-verilog",
Expand All @@ -1693,7 +1693,7 @@ export const supportedLangs = [
"turtle",
"twig",
"typescript",
// "ts",
"ts",
// "v",
"vb",
// "cmd",
Expand All @@ -1712,6 +1712,6 @@ export const supportedLangs = [
"xml",
"xsl",
"yaml",
// "yml",
"yml",
"zenscript",
];

0 comments on commit 34a106d

Please sign in to comment.