Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate Markdown comments to MDX comments #545

Merged
merged 1 commit into from
Nov 5, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/1-trial-session/02-html/index.mdx
Original file line number Diff line number Diff line change
@@ -66,7 +66,7 @@ VS Code 上で作成したファイルは `index.html` でした。しかしな

`body` 要素の中身を書き換え、次のようにしてみましょう。

<!-- prettier-ignore -->
{/* prettier-ignore */}
```html title="index.html"
<!doctype html>
<html lang="ja">
2 changes: 1 addition & 1 deletion docs/1-trial-session/06-boolean/index.mdx
Original file line number Diff line number Diff line change
@@ -69,7 +69,7 @@ const canRideRollerCoasters = age >= 10 && height >= 140; // true

次のコードは何を表示するでしょうか。そしてそれはなぜでしょうか。

<!-- prettier-ignore -->
{/* prettier-ignore */}
```javascript
let takaoHeight = 599;
let everestHeight = 8849;
5 changes: 3 additions & 2 deletions docs/1-trial-session/08-loop/index.mdx
Original file line number Diff line number Diff line change
@@ -79,7 +79,8 @@ i = i + 1;
i += 1;
```

<!-- 教えるかどうか議論
{/* prettier-ignore */}
{/* 教えるかどうか議論
[**インクリメント演算子**](https://developer.mozilla.org/ja/docs/Web/JavaScript/Reference/Operators/Increment) は、与えられた変数に1を足します。
一方、[**デクリメント演算子**](https://developer.mozilla.org/ja/docs/Web/JavaScript/Reference/Operators/Decrement) は、与えられた変数から1を引きます。

@@ -96,7 +97,7 @@ i = i + 1;
i++;
```

-->
\*/}

:::

7 changes: 5 additions & 2 deletions docs/1-trial-session/10-array/index.mdx
Original file line number Diff line number Diff line change
@@ -229,7 +229,9 @@ document.write(`<p>空の配列の最大値は ${findMaxNumber([])} です。</p

</Answer>

<!-- オブジェクトはまだ扱っていないためコメントアウト
{/* prettier-ignore */}
{/* オブジェクトはまだ扱っていないためコメントアウト
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

これオブジェクトに移動して消した記憶があります...
今度消し直しておきます


## 配列とオブジェクト

配列はオブジェクトの一種です。しかしながら、JavaScript のオブジェクトとは、[オブジェクトの節](/docs/trial-session/object/)で扱ったように、プロパティ名とプロパティ値の組み合わせでした。
@@ -258,4 +260,5 @@ document.write(studentNames["0"]); // 田中
```

:::
-->

\*/}
3 changes: 1 addition & 2 deletions docs/2-browser-apps/03-class/index.mdx
Original file line number Diff line number Diff line change
@@ -357,8 +357,7 @@ document.write(false.toString()); // false

### 課題

<!-- FIXME: 雑すぎるので修正してください
Answerタグもその時に追加してください。 -->
{/* FIXME: 雑すぎるので修正してください。Answerタグもその時に追加してください。 */}

`document.getElementById` 関数で `div` 要素を取得すると、[`HTMLDivElement` クラス](https://developer.mozilla.org/ja/docs/Web/API/HTMLDivElement)のインスタンスが返されます。このクラスは [`HTMLElement` クラス](https://developer.mozilla.org/ja/docs/Web/API/HTMLElement) を継承しており、さらに `HTMLElement` クラスは [`Element` クラス](https://developer.mozilla.org/ja/docs/Web/API/Element)を、`Element` クラスは [`Node` クラス](https://developer.mozilla.org/ja/docs/Web/API/Node)を継承しています。

2 changes: 1 addition & 1 deletion docs/2-browser-apps/04-anonymous-function/index.mdx
Original file line number Diff line number Diff line change
@@ -36,7 +36,7 @@ document.getElementById("strange-button").onclick = () => {

JavaScript における関数式の構文は、次のとおりです。`=>` の記号が特徴的な構文となっています。

<!-- prettier-ignore -->
{/* prettier-ignore */}
```javascript
(引数1, 引数2) => {
処理;
2 changes: 1 addition & 1 deletion docs/5-team-development/01-git-workflow/index.mdx
Original file line number Diff line number Diff line change
@@ -113,7 +113,7 @@ HEAD が `master` ブランチを指している状態で、コミットを行

この例の場合、共通の祖先に対して `master` は `<li>三四郎</li>` が、`feature` は `<li>こころ</li>` が**同じ場所に**追加されています。この状態で `git merge feature` を実行すると、Git は**コンフリクト**を報告し、マージを中断します。コンフリクトが発生したファイルには、Git により自動的に `<<<<<<<` や `=======`、`>>>>>>>` といったコンフリクトマーカーが挿入されます。

<!-- 頭にインデントを入れておくことで Markdown ファイルのコンフリクトと認識させない -->
{/* 頭にインデントを入れておくことで Markdown ファイルのコンフリクトと認識させない */}

<CodeBlock language="html">{outdent`

2 changes: 1 addition & 1 deletion docs/9-old/day02/03.mdx
Original file line number Diff line number Diff line change
@@ -10,7 +10,7 @@ title: JavaScriptによるプログラミング

JavaScript において、セミコロン(`;`)で終わるまとまりを**文**と呼びます。JavaScript は、ファイルの先頭から終わりに向けて、順番に文が実行されます。

<!-- prettier-ignore -->
{/* prettier-ignore */}
```js
document.write('Hello'); document.write('My');
document.write('Special'); document.write('World');
2 changes: 1 addition & 1 deletion docs/9-old/day03/03.mdx
Original file line number Diff line number Diff line change
@@ -50,7 +50,7 @@ for (const element of elements) {

## 課題

<!-- prettier-ignore -->
{/* prettier-ignore */}
```html
<table>
<tr><th></th><th>1</th><th>2</th><th>3</th><th>4</th><th>5</th><th>6</th><th>7</th><th>8</th><th>9</th></tr>
2 changes: 1 addition & 1 deletion docs/9-old/day03/04.mdx
Original file line number Diff line number Diff line change
@@ -68,7 +68,7 @@ callTwice(() => {

は、

<!-- prettier-ignore -->
{/* prettier-ignore */}
```js
x => {
return x * 2;