generated at
コードブロック記法の拡張子を指定する記法
code:A(B) と記述することで、コードブロック記法のタイトルをAとしたままBの言語のsyntax highlightを適用できるらしい
つまり、こういうこと
TypeScript(sh)
if [1 -gt 0]; then echo "I'm TypeScript!" fi
code:TypeScript(sh) と記述しているので、タイトルはTypeScriptなのにsyntax highlightはshが適用されている

実装
assets/index.jsを読むと、だいたいこんな感じ
detectCodeBlockStart.js
export const detectCodeBlockStart = (text) => { const matches = text.match(/^\s*code:(.+)\(([^()]+)\)$/) ?? text.match(/^\s*code:(.+)$/); if (!matches) return {}; const [, filename, lang] = matches; return { filename: filename.trim(), lang: lang || filename.split(".").pop() ?? "", }; };

参考元とまともな実用例

正式名称が分からなかったtakker
他の表現