2
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

GFMのFenced code blocksでハマる

Posted at

GitHub Flavored Markdown(GFM)使いには常識かもしれないが、fenced code block(```)をordered list(1.)内で使おうとしてハマった。

失敗例1

ordered list内でfenced code blockを行頭から始めると、fenced code blockの次の要素が新たなfenced code blockとして始まってしまう。

  • The three steps
    1. First,
write some code
1. Second,
1. Third,

失敗例2

fenced code blockをindentした。一見うまくいったかと思いきや、後続の採番に失敗する。

  • The three steps

    1. First,

write some code

    1. Second,
    1. Third,

# 成功例
もう一段indentした。

- The three steps
    1. First,

        ```
write some code
1. Second,

    ```

write more code

    1. Third,

        ```
write better code

fenced code blockのindentはきっちりと。

2
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?