[HTML & CSS General] Haml: double quote attributes を設定する
素の状態で利用すると、htmllint に怒られました。
[markdown]
“`prettyprinted
[L189:C27] The value of attribute [ src ] must closed by double quotes.
“`
## CLI でコンパイルする場合
以下のオプション付きでコンパイルすれば良いようです。
“`prettyprinted
% haml –help | grep quote
-q, –double-quote-attributes Set attribute wrapper to double-quotes (default is s
ingle).
“`
## middleman でコンパイルする場合
オプションを調べると、こんな物があるようです。
> [haml/options.rb](https://github.com/haml/haml/blob/cea0fe57d0e1c38bc55d894cb332886df93935df/lib/haml/options.rb)
`:attr_wrapper` で指定できるので、config.rb に設定を加えます。
“`ruby:config.rb
###
# Haml
###
# Double-quotes!
set :haml, { attr_wrapper: “\”” }
“`
[/markdown]