Diacritics in style names and search

This is mostly a request for Dan.

There are several (non-English) CSL styles for journals/organizations that
have diacritics in their names, like the “Kölner Zeitschrift für Soziologie
und Sozialpsychologie” and “Associação Brasileira de Normas Técnicas”. But
as “associacao” doesn’t match “Associação” in the Zotero Style Repository
search, this can make finding these styles a bit difficult.

I’ve recently replaced abbreviated style file names like “abnt.csl” with
the full name while dropping diacritics, e.g.
“associacao-brasileira-de-normas-tecnicas.csl”. One of the benefits of this
is that the Zotero Style Repository currently already matches against both
the style title and file name. Dan, could you modify the search index by
replacing the hyphens in file names by spaces? It would be nice if
"associacao brasileira" would (also) match “associacao-brasileira”.


Another case I forgot to mention is ampersands in titles, like “Meteoritics
& Planetary Science”. I replace these by “and” in the file name
(meteoritics-and-planetary-science.csl), so also here it would be helpful
if the search string “meteoritics and” would match the "meteoritics-and"
from the file name.


I think this should be an easy fix:

in http://www.zotero.org/styles-files/js/js.1306090440.js , the style file
name (actually the last part of the style link, but that should be the
same) is extracted by

var name = $(this).attr(“href”).match(/([^/]+(?:/dev)?(?:?dep=1)?)$/)[0];

It should be enough to add a simple find-and-replace after that, e.g.

name = name.replace(/-/g," ");


Sorry for spamming, but I just discovered that my proposal doesn’t work, as
the name variable is used again later on, so I shouldn’t be messing with it.

The following does work: