Skip to content

Commit

Permalink
Allow hyphens in template names
Browse files Browse the repository at this point in the history
Hey there, I think it’s a bit unexpected that hyphens are not accepted in template names. It took me quite a while until I had figured what was going on 😅
  • Loading branch information
wmnnd authored and edgurgel committed Jan 20, 2023
1 parent edb85e4 commit 37434df
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/solid/file_system.ex
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ defmodule Solid.LocalFileSystem do
end

def full_path(template_path, file_system) do
if String.match?(template_path, Regex.compile!("^[^./][a-zA-Z0-9_/]+$")) do
if String.match?(template_path, Regex.compile!("^[^./][a-zA-Z0-9_/-]+$")) do
template_name = String.replace(file_system.pattern, "%s", Path.basename(template_path))

full_path =
Expand Down

0 comments on commit 37434df

Please sign in to comment.