Skip to content

Commit 1d35ff3

Browse files
committed
正規表現が何をするのかコメントを追加する
1 parent eb43a2b commit 1d35ff3

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/app/docs/[id]/page.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ export default async function DocDetails({
8686
remarkPlugins={[remarkGfm]}
8787
components={{
8888
code({ node, className, children, ...props }) {
89+
/* 正規表現を使って className から言語名を抽出する */
8990
const match = /language-(\w+)/.exec(className || "");
9091
return match ? (
9192
<SyntaxHighlighter

0 commit comments

Comments
 (0)