【问题标题】:HAML doesn't change _ to -HAML 不会将 _ 更改为 -
【发布时间】:2017-11-16 11:57:07
【问题描述】:

我有这行的haml文件

.class{ aria_hidden: "true" }

编译后创建haml

<div class="class" aria_hidden="true">

为什么haml不把_改成-

【问题讨论】:

    标签: html pug haml


    【解决方案1】:

    查看您的 HAML 配置文件:hyphenate_data_attrs: true;

    HAML documentation

    #hyphenate_data_attrs

    如果设置为 true,Haml 将在所有自定义数据属性中将下划线转换为连字符自 Haml 4.0 起,默认为 true。

    【讨论】:

      猜你喜欢
      • 2020-11-02
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2022-11-24
      • 1970-01-01
      • 2011-08-04
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多