LoginSignup
7
7

More than 5 years have passed since last update.

「うわー、コードハイライトの先頭に変な空白入っちゃってるよ、どうするのこれ」という事態がhamlを使っているときに起こったとき

Posted at

起こりえるケース

hamlを使っていて、かつMarkdownのレンダラーを使っているとき。preタグの中にhamlが変なスペースを突っ込んでくるのでつらい。

解決方法

config/initializer/haml.rbといったファイルを作成し、以下のように書く。

Haml::Template.options[:ugly] = true

hamlがインデントに応じた綺麗なhtmlを吐かなくなるけど、別にインデントなくて良くね?とも思う。

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