3
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.

"-"(ハイフン)や"="(イコール)から始まるPlain Textを出力する

Posted at

-, =から始まるPlain Textを出力したい場合、それらの文字を\でエスケープする。

そうしないと、-=のあとに続く文字列がRubyのコードとして評価されてしまうので、思った通りの出力にならない。

こんな感じ。

%p
  \-20

%p
  \=20

参考:
File: REFERENCE — Haml Documentation

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