Skip to content

Commit 9b418f4

Browse files
committed
C++の2〜4章を書き直したくなった
5〜11 → 7〜13, 12 → 6 に移動 close #80
1 parent b376a96 commit 9b418f4

File tree

16 files changed

+2630
-2380
lines changed

16 files changed

+2630
-2380
lines changed

app/[docs_id]/styledSyntaxHighlighter.tsx

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ export type MarkdownLang =
3535
| "json"
3636
| "csv"
3737
| "html"
38+
| "makefile"
39+
| "cmake"
3840
| "text"
3941
| "txt";
4042

@@ -50,7 +52,9 @@ export type SyntaxHighlighterLang =
5052
| "typescript"
5153
| "bash"
5254
| "html"
53-
| "json";
55+
| "json"
56+
| "makefile"
57+
| "cmake";
5458
export function getSyntaxHighlighterLang(
5559
lang: MarkdownLang | undefined
5660
): SyntaxHighlighterLang | undefined {
@@ -80,6 +84,10 @@ export function getSyntaxHighlighterLang(
8084
return "json";
8185
case "html":
8286
return "html";
87+
case "makefile":
88+
return "makefile";
89+
case "cmake":
90+
return "cmake";
8391
case "csv": // not supported
8492
case "text":
8593
case "txt":

app/pagesList.ts

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -77,17 +77,18 @@ export const pagesList = [
7777
description: "C++の基本から高度な機能までを学べるチュートリアル",
7878
pages: [
7979
{ id: 1, title: "C++の世界へようこそ" },
80-
{ id: 2, title: "型システムとメモリ" },
81-
{ id: 3, title: "関数と参照" },
82-
{ id: 4, title: "ポインタと動的メモリ" },
83-
{ id: 5, title: "クラスの基礎" },
84-
{ id: 6, title: "クラスを使いこなす" },
85-
{ id: 7, title: "継承とポリモーフィズム" },
86-
{ id: 8, title: "テンプレート" },
87-
{ id: 9, title: "STL ①:コンテナ" },
88-
{ id: 10, title: "STL ②:アルゴリズムとラムダ式" },
89-
{ id: 11, title: "RAIIとスマートポインタ" },
90-
{ id: 12, title: "プロジェクトの分割とビルド" },
80+
{ id: 2, title: "型システムと制御構造" },
81+
{ id: 3, title: "データ集合とモダンな操作" },
82+
{ id: 4, title: "ポインタとメモリ管理" },
83+
{ id: 5, title: "関数と参照渡し" },
84+
{ id: 6, title: "プロジェクトの分割とビルド" },
85+
{ id: 7, title: "クラスの基礎" },
86+
{ id: 8, title: "クラスを使いこなす" },
87+
{ id: 9, title: "継承とポリモーフィズム" },
88+
{ id: 10, title: "テンプレート" },
89+
{ id: 11, title: "STL ①:コンテナ" },
90+
{ id: 12, title: "STL ②:アルゴリズムとラムダ式" },
91+
{ id: 13, title: "RAIIとスマートポインタ" },
9192
],
9293
},
9394
{

app/terminal/editor.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,8 @@ export function getAceLang(lang: MarkdownLang | undefined): AceLang {
7373
case "text":
7474
case "txt":
7575
case "html":
76+
case "makefile":
77+
case "cmake":
7678
case undefined:
7779
console.warn(`Ace editor mode not implemented for language: ${lang}`);
7880
return "text";

app/terminal/runtime.tsx

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,8 @@ export function getRuntimeLang(
7878
case "text":
7979
case "txt":
8080
case "html":
81+
case "makefile":
82+
case "cmake":
8183
case undefined:
8284
// unsupported languages
8385
return undefined;
@@ -166,15 +168,17 @@ export function langConstants(lang: RuntimeLang | AceLang): LangConstants {
166168
case "c_cpp":
167169
case "cpp":
168170
return {
169-
tabSize: 2,
171+
// 2文字派と4文字派があるが、geminiが4文字で出力するので4でいいや
172+
tabSize: 4,
170173
};
171174
case "rust":
172175
return {
173176
tabSize: 4,
174-
}
177+
};
175178
case "json":
176179
return {
177-
tabSize: 2,
180+
// python-7章で使っている
181+
tabSize: 4,
178182
};
179183
case "csv":
180184
case "text":

0 commit comments

Comments
 (0)