1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

適当に シンタックスハイライト設定していると思うけれど エラー下線ついてるのって恥ずかしくないです?

1
Last updated at Posted at 2026-10-13

qiita の シンタックスハイライトは Rouge というライブラリが使われています。

playground ↓

例えば 多くの人がなんか指定してみているけれど エラー となっていることの多い シンタックスハイライトの http ですが

POST /demo/submit/

rouge のサンプルだとこうなるので

POST /demo/submit/ HTTP/1.1
Host: rouge.jneen.net
Cache-Control: max-age=0
Origin: http://rouge.jayferd.us
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_2)
    AppleWebKit/535.7 (KHTML, like Gecko) Chrome/16.0.912.63 Safari/535.7
Content-Type: application/json
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Referer: http://pygments.org/
Accept-Encoding: gzip,deflate,sdch
Accept-Language: en-US,en;q=0.8
Accept-Charset: windows-949,utf-8;q=0.7,*;q=0.3

{"name":"test","lang":"text","boring":true}

こう書けばいいことがわかります

POST /demo/submit/ HTTP/1.1

もしも Rouge に対応していない構文があったら

もしも Rouge にて 対応していない構文を見つけたときは

Rouge に すでに issues が建っていないか確認したうえで

issue を建てましょう

私はこれで CSS の & ……ネスティングセレクタ の対応をしてもらいました。

Rouge は対応済みだけど Qiita に反映されていないときは

Qiita のディスカッションにて催促しましょう。

私はこれで Qiita に js の #private_field が使えるようになりました。

以上。

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?