Skip to content

Commit

Permalink
Merge pull request #41 from algunion/master
Browse files Browse the repository at this point in the history
kebab function fix
  • Loading branch information
SimonDanisch authored Nov 22, 2023
2 parents 19bed0a + 5a54464 commit 1096d74
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Hyperscript.jl
Original file line number Diff line number Diff line change
Expand Up @@ -179,8 +179,8 @@ printescaped(io::IO, x::AbstractChar, escapes) = printescaped(io, string(x), esc
# allocation via sprint. future use: sprint(printescaped, x, escapes))
printescaped(io::IO, x, escapes) = printescaped(io, sprint(print, x), escapes)

# pass numbers through untrammelled
kebab(camel::String) = join(islowercase(c) || isnumeric(c) || c == '-' ? c : '-' * lowercase(c) for c in camel)
# pass numbers (and 1-character attributes) through untrammelled
kebab(camel::String) = length(camel) > 1 ? join(islowercase(c) || isnumeric(c) || c == '-' ? c : '-' * lowercase(c) for c in camel) : camel


## HTMLSVG
Expand Down

0 comments on commit 1096d74

Please sign in to comment.