Skip to content

Instantly share code, notes, and snippets.

@Phroneris
Last active March 30, 2024 05:50
Show Gist options
  • Star 47 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Phroneris/e7e6c869640b95bd42434bdc995cd4f6 to your computer and use it in GitHub Desktop.
Save Phroneris/e7e6c869640b95bd42434bdc995cd4f6 to your computer and use it in GitHub Desktop.
GitHubのMarkdownで折りたたみ記法の中身を整形させる方法

どうやら</summary>後の空行以降から整形される。

記述

違いは</summary>後の空行だけ。

<details>
<summary>これは中身が整形されない</summary>
1. 野菜**A**の皮を剥く。
2. 乱切りにする。
3. 調味料**B**と合わせて炒める。
    - `火傷`に注意。
</details>

<details>
<summary>これは中身が整形される</summary>

1. 野菜**A**の皮を剥く。
2. 乱切りにする。
3. 調味料**B**と合わせて炒める。
    - `火傷`に注意。
</details>

結果

これは中身が整形されない 1. 野菜**A**の皮を剥く。 2. 乱切りにする。 3. 調味料**B**と合わせて炒める。 - `火傷`に注意。
これは中身が整形される
  1. 野菜Aの皮を剥く。
  2. 乱切りにする。
  3. 調味料Bと合わせて炒める。
    • 火傷に注意。

おまけ

<details open>
<summary>`open`属性を与えるとデフォルトで開く</summary>

| 肉A  | 肉B  |
|:----:|:----:|
|うまい|まずい|
</details>
open属性を与えるとデフォルトで開く
肉A 肉B
うまい まずい

参考リンク

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment