Skip to content

Commit

Permalink
Remove ¡, ?, and ¿ from slugs
Browse files Browse the repository at this point in the history
  • Loading branch information
eliotjordan committed Nov 19, 2024
1 parent 1ae95ca commit a8ecdeb
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion solr/conf/slug.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 13 additions & 0 deletions test/dpul_collections/solr_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -188,4 +188,17 @@ defmodule DpulCollections.SolrTest do
assert Solr.find_by_id("3cb7627b-defc-401b-9959-42ebc4488f74")["slug_s"] ==
"ديوان-القاضي-ناصح-الدين-ابي"
end

test "slug generation with Spanish title" do
doc = %{
"id" => "3cb7627b-defc-401b-9959-42ebc4488f74",
"title_txtm" => ["¡¿Él no responde mis mensajes!?"]
}

Solr.add([doc], active_collection())
Solr.commit(active_collection())

assert Solr.find_by_id("3cb7627b-defc-401b-9959-42ebc4488f74")["slug_s"] ==
"él-no-responde-mis-mensajes"
end
end

0 comments on commit a8ecdeb

Please sign in to comment.