From 141a1a32197d03a530e82f9a547f0e79f606a9ed Mon Sep 17 00:00:00 2001 From: Brandon Dyck Date: Sat, 27 Apr 2019 15:00:56 -0600 Subject: [PATCH] Use rune param for Accesskey --- attribute/accesskey.go | 10 ++++++++++ attribute/generated.go | 8 -------- defs.json | 1 - 3 files changed, 10 insertions(+), 9 deletions(-) create mode 100644 attribute/accesskey.go diff --git a/attribute/accesskey.go b/attribute/accesskey.go new file mode 100644 index 0000000..aba0160 --- /dev/null +++ b/attribute/accesskey.go @@ -0,0 +1,10 @@ +package attribute + +import "gitlab.codemonkeysoftware.net/b/hatmill" + +func Accesskey(value rune) hatmill.Attrib { + return hatmill.Attrib { + Key: "accesskey", + Value: string([]rune{value}), + } +} diff --git a/attribute/generated.go b/attribute/generated.go index c458d7c..8914657 100644 --- a/attribute/generated.go +++ b/attribute/generated.go @@ -22,14 +22,6 @@ func AcceptCharset(value string) hatmill.Attrib { } } -// Accesskey creates a "accesskey" attribute -func Accesskey(value string) hatmill.Attrib { - return hatmill.Attrib{ - Key: "accesskey", - Value: value, - } -} - // Action creates a "action" attribute func Action(value string) hatmill.Attrib { return hatmill.Attrib{ diff --git a/defs.json b/defs.json index 2bfd22b..8962d68 100644 --- a/defs.json +++ b/defs.json @@ -2,7 +2,6 @@ "attributes": [ {"name": "accept", "type": "string"}, {"name": "accept-charset", "type": "string"}, - {"name": "accesskey", "type": "string"}, {"name": "action", "type": "string"}, {"name": "alt", "type": "string"}, {"name": "async", "type": "bool"},