1
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 1 year has passed since last update.

【Markdown記法】Qiitaでコードの差異&シンタックスハイライト&名前を同時に表示

Posted at

コードの差異&シンタックスハイライト&名前を同時に表示

下のような書き方がどうやったらできるかを解説します。

example.php
<?php
- print("before");
+ print("after");

結論

以下のように書きます。

```diff_php:example.php
<?php
- print("before");
+ print("after");
```

diff_(言語名):名前 という形式で書くことで、

  • コードの差異
  • シンタックスハイライト
  • 名前

を同時にできます。
Qiitaで記事を書く際に参考になれば幸いです。

1
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
1
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?