Breaking changes in 0.3
It looks like there's some breaking changes in 0.3. I haven't looked into them too fully yet but some of my tests are now breaking. Here's an example FunctionClauseError I'm getting.
** (FunctionClauseError) no function clause matching in Regex.replace/4
The following arguments were given to Regex.replace/4:
# 1
~r/['’]s/u
# 2
nil
# 3
"s"
# 4
[global: nil]
Attempted function clauses (showing 2 out of 2):
def replace(regex, string, replacement, options) when is_binary(string) and is_binary(replacement) and is_list(options)
def replace(regex, string, replacement, options) when is_binary(string) and is_function(replacement) and is_list(options)
code: conn = post conn, api_community_path(conn, :create), %{community: community_params}
stacktrace:
(elixir) lib/regex.ex:595: Regex.replace/4
(slugger) lib/slugger.ex:40: Slugger.slugify/2
Is there any documentation of the breaking changes?
Have an issue with this character too. README promises only A-Za-z0-9 alphabet is possible, but it's not:
iex(2)> Slugger.slugify_downcase "Children´s Playroom"
"children´s-playroom"
iex(3)>
For comparison here is the correct output from version 0.2.0:
iex(2)> Slugger.slugify_downcase "Children´s Playroom"
"children-s-playroom"
@h4cc any chance you could take a look at this? Would you accept a PR to bring back the old behavior?
It looks like this is the change that broke things: https://github.com/h4cc/slugger/commit/570c95ed171115d4d1d534060bb245760a908299