From 4a9b5a6eab8084e1ab44d2fbd49f55394162daac Mon Sep 17 00:00:00 2001 From: Joel Drapper Date: Tue, 30 Jan 2024 10:29:10 +0000 Subject: [PATCH] Update index.md --- pages/index.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pages/index.md b/pages/index.md index dddbf25..46e293d 100644 --- a/pages/index.md +++ b/pages/index.md @@ -194,11 +194,12 @@ end render Greeting ``` -Underscores `_` are automatically converted to dashes `-` for `Symbol` keys. If you need to use an underscore in an attribute name, you can pass it as a `String`. +Underscores `_` are automatically converted to dashes `-` for `Symbol` keys. If you need to use an underscore in an attribute name, you can use a `String` key instead. ```phlex class Greeting < Phlex::HTML def template + h1(foo_bar: "hello") { "👋 Hello World!" } h1("foo_bar" => "hello") { "👋 Hello World!" } end end @@ -208,7 +209,7 @@ render Greeting ``` ### Hash attributes -You can pass a `Hash` as an attribute value and the Hash will be flattened with a dash between each level. +You can pass a `Hash` as an attribute value and it will be flattened with a dash `-` between each level. ```phlex class Greeting < Phlex::HTML